To help protect our skin from invisible ultraviolet (UV) rays from the sun, namely UVA and UVB rays. UVC rays are short wavelength and do not reach the earth's surface.
UVB rays make up about 5-10% of the rays that reach us:
UVA rays constitute approximately 90-95% of the rays that reach the Earth:
Pure & Simple Baby