In one half of the cycle carbon is in food, in the other half carbon is in carbon dioxide. This is a simple case of reversing cause and effect. The molecules don t generate heat by starting to move. They start moving because they have received heat. If energy, such as light, striking an object starts the molecules in the object moving in a way that becomes random, the absorbed energy has been converted into heat energy.
Heat is the name given to the energy of the randomly moving molecules in matter.
I have seen the reversal explained in this way, Just as friction between moving objects generates heat, so the motion of molecules in matter creates heat, the faster the molecules move the more heat they create. Indirectly, we might be able to claim that Earth receives heat from Sun, but not as students understand the statement. Radiant heat is a 19th century concept. Remember, Heat is the energy of the random motion of the particles in matter. Where there are no particles of matter, there can not be any heat.