The sun is the source of heat and light in the solar system. This is called solar radiation. A very small fraction of this solar radiation is received on the earth’s surface (1.5 billionth fractions only.)
The small portion of solar radiation received by the earth is called insolation (incoming solar radiation). It is received in the form of short waves and it warms up the earth’s surface. The earth in turn gives out or radiates that heat it has absorbed back into the atmosphere in the form of a long wave radiation. This is called terrestrial radiation.
The atmosphere allows the rays of the sun to pass through without being heated by them. However, it gets warmed by the terrestrial radiation. So we see that the air around us does not get heated directly by the sun’s rays but indirectly by the heated surface of the earth through conduction and convention currents.