What is the ozone layer for?

The ozone layer acts like a protective shield for the Earth. Ozone is a molecule consisting of three atoms of oxygen. When UV rays fall on an ozone molecule, their energy is utilized in breaking up the bonds to give an oxygen molecule. As such, most of UV-A and UV-B energies are absorbed, leaving only the less harmful rays to pass through to the Earth.

In the absence of the ozone layer, UV rays would be able to directly penetrate into the atmosphere. UV being high energy rays can penetrate skin too and cause mutations in the DNA, leading to skin cancer.