Sunlight is a form of electromagnetic energy. It is commonly referred to as solar energy. Sunlight contains packets of energy called photons. These photons move as a series of transverse waves that do not require a medium for propagation. This allows light to travel through vacuum.
Electromagnetic energy from the sun contains visible light, infrared light and ultraviolet light. Infrared and ultraviolet radiations do not fall in the visible part of the electromagnetic spectrum and are harmful to all life on Earth. This part of the solar energy is absorbed by the ozone layer surrounding the Earth’s atmosphere. Light from the sun takes about 8 minutes and 11 seconds to reach the earth.