Let’s think about how life is involved in this process. Our solar photon can do much more than simply be scattered by the atmosphere, it might also be absorbed by a chlorophyl inside a leaf. The thermodynamics of photosynthesis are too complicated to discuss in detail yet, but the overall process is basically going to synthesize sugar which will make more plant and/or eventually be eaten by an animal and turned into motion and/or more animal. The point to notice is that once it gets involved in the machinations of life, the energy that was in our photon has a much more tortuous and complicated path to follow before it escapes back out to the atmosphere almost entirely degraded from concentrated, high energy-radiation into diffuse, thermal radiation which is now energetic enough to wiggle and vibrate chemical bonds but not to excite the electrons in them. As a result, there are “more quanta” of energy leaving the earth than entering, even though the the total energy entering and leaving is the same. This increase in the number of "pieces" of energy is a direct measure of the total entropy production of the earth and all life on the earth. According to Sean Carrol, this ratio is currently about 20 to 1, so you can picture uv light entering the earth as being made up of 20 dollar bills, and the thermal radiation leaving the earth as being composed of one dollar bills. Overall though, the value in equals the value out and the total cash amount never changes, it is only ever split up into smaller and smaller fractions. Out there in space, the dollars are still breaking into pennies. Bear in mind though, radiation is radiation whether it’s “light” or “heat” just like cash is cash whether its Franklins or Washingtons.