An ultraviolet sensor (UV sensor) is a device that measures UV light from the Sun.
"Ultraviolet (UV) is a form of electromagnetic radiation with wavelength from 10 nm (with a corresponding frequency of approximately 30 PHz) to 400 nm (750 THz), shorter than that of visible light but longer than X-rays. UV radiation is present in sunlight, and constitutes about 10% of the total electromagnetic radiation output from the Sun"
The UV index is an international standard measurement of how strong the ultraviolet (UV) radiation from the sun is at a particular place on a particular day. It is a scale primarily used in daily forecasts aimed at the general public.
Its purpose is to help people to effectively protect themselves from UV light, of which excessive exposure causes sunburns, eye damage such as cataracts, skin aging, and skin cancer (see the section health effects of ultraviolet light).