Produced by the sun and invisible to the naked eye, ultraviolet light can cause sunburn and skin cancer by damaging the genetic material in our skin cells. However, its effects are not only negative, as it kills many of the bacteria and viruses in the atmosphere. It also induces the production of vitamin D in the skin, which helps regulate the calcium metabolism and prevent bone deformities.
The Earth’s stratosphere deflects most of it, especially the most dangerous rays, and only admits the necessary amount for life to exist and for most airborne bacteria to be killed. This is why barbers used to disinfect their razor blades and combs by exposing them to direct sunlight, and why hanging your washing out to dry in the sun is in principle more hygienic than simply using a drying machine or central heating.
But if some ultraviolet rays, such as UVA and UVB, can benefit your health, prolonged and unprotected exposure can be very harmful. On the other hand, shorter wavelength UV rays like UVC, which are found at higher altitudes, can be very dangerous.
On a historical note, although modern science only differentiated UV light from the light spectrum in 1801, it seems to have been known well before then, as can be seen from remains of the alchemically treated stained glass of the great gothic cathedral of Chartres (13th century), which was found to have acted as a filter for UV light.
Image Credits: By John T. Clarke | Wikimedia Commons | CC BY PD