The main source of the earth’s energy is the sun.
When the atmosphere and terrestrial surface absorb
electromagnetic energy their physical temperatures tend to
rise.
At the same time both the atmosphere and surface radiate
energy in a process called thermal emission. The amount of
thermal radiation is a function of wavelength and physical
temperature.
Planck’s radiation law characterizes the thermal radiation of a
blackbody, which is any material that absorbs all incident
radiation without any reflection. It is hence a perfect absorber
and also a perfect emitter. Such blackbody spectral radiation
has intensity: