The solar energy (in the form of sun's light) that Earth receives is not able to reach the surface completely. Part of it is absorbed by our atmosphere and is reflected back, while the rest manages to reach the surface. It has been estimated that almost half of the solar energy is reflected back and only one half is able to reach the earth's surface. This fraction of solar energy heats the surface and the temperature of our surface rises. At this time, Earth's surface starts acting like a black body and radiate energy. The emissions are generated in the shorter wavelength region and are known as Infrared radiations. These infrared radiations are emitted back to the space, thereby maintaining the temperature on earth's surface.
Hope this helps.