The short wavelengths of visible light from the sun
are absorbed by the medium but the larger
wavelengths of infrared radiation could not be
absorbed and results in heating the surface. Example
of such effect is the heating of car by sunlight
passing through the windshield.
Earth reflects about 30% of the radiation and the
remaining 70% is absorbed, which results in heating
the earth's surface and atmosphere.