Here is how the sun's UV affects life on earth.

When the sun comes up, its energy is emitted in different wavelengths. What we see is visible light. It is also infra-red (felt as heat) and ultraviolet (UV) rays (which we do not see or feel). UV itself has different wavelengths too, and the shorter it is, the stronger and more damaging it is. UV wavelengths are measured in ‘Nanometers, nm’. 

Let us see the three basic types: UVA UVB and UVC. 

UVA has a long wavelength (315-399nm) and reaches the earth all the time. It helps generate vitamin D for living things. UVB is not as long as UVA (280-314nm). Because it is shorter, it is more damaging to human and plant cells. Not all UVB reaches the earth, as some of it is filtered by the ozone layer. The little that reaches the earth causes sunburns and can also damage our cells and DNA (DNA is the basic building block of our cells). This is why it can cause skin cancer and cataracts in our eyes. The amount of UVB that reaches us on earth depends on things like the time of the day, the time of the year, and the amount of stratospheric ozone available to block it.

UVC has the shortest wavelength (100-279nm). It is the most dangerous but all of it is usually absorbed by the ozone layer.