Sunlight is composed of three components:-
1. Visible light: which enables the objects to be visible. The objects absorb the rays and reflect the ones which give them color.
2. Ultra violet rays: These rays are the most harmful ones. Although they are absorbed by the ozone layer and very less amount is able to reach the Earth's surface. These are cancer causing rays.
3. Infra red rays: These are the rays which are responsible for maintaining the temperature of the Earth's atmosphere. The maximum amount of sun's rays reaching the Earth are IR rays.