Active control of heat flow is crucial for the thermal management of increasingly complex electronic and spintronic devices. In addition to conventional heat transport engineering, spin caloritronics has received extensive attention as a heat control principle owing to its high controllability and unique thermal energy conversion symmetry. Here we demonstrate that the direction of heat currents generated by spin-caloritronic phenomena can be changed simply by illuminating magnetic materials with visible light. The optical control of heat currents is realized through a combination of the spin-driven thermoelectric conversion called an anomalous Ettingshausen effect and all-optical helicity-dependent switching of magnetization. This approach enables not only pinpoint manipulation and flexible design of the heat current distribution by patterning the illuminating light but also on/off control of the resulting temperature modulation by tuning the light polarization. These versatile heat control functionalities will open up a pathway for nanoscale thermal energy engineering.