The visible spectrum of light that humans see is merely a narrow portion of the larger spectrum of electromagnetic radiation.
Explanation;
The electromagnetic spectrum is a continuum of all electromagnetic waves arranged according to frequency and wavelength. The sun, earth, and other bodies radiate electromagnetic energy of varying wavelengths. Electromagnetic energy passes through space at the speed of light in the form of sinusoidal waves.
The visible spectrum is the portion of the electromagnetic spectrum that is visible to the human eye. Electromagnetic radiation in this range of wavelengths is called visible light or simply light.
"<span>The genes for melanin pigmentation remain turned on and prepare more melanin than usual to protect the skin from photo-damage when it is exposed to sunlight for long time" is the actual reason. </span>