O3, or ozone, is an important component of our upper atmosphere. Ozone absorbs ultraviolet (UV) light and dissociates as shown in Equation 1, below.
In the presence of an inert molecule like nitrogen, monatomic oxygen and diatomic oxygen eventually recombine to regenerate ozone, as shown in Equation 2.
If the ozone concentration in the upper atmosphere is large enough, most of the high-energy ultraviolet light from the sun is absorbed before reaches the surface of the Earth where it can damage plants and cause skin cancer. Some compounds like chlorofluorocarbons react with ozone and dissociate it before it can absorb any UV light. The ozone will be regenerated eventually, but if new ozone molecules are destroyed by reactive chemicals nearly as quickly as they form, less UV light is absorbed in the upper atmosphere and more of it penetrates to Earth's surface. The "ozone hole" is a region of the upper atmosphere where the ozone concentration is low.
Ozone in the upper atmosphere is definitely helpful, providing a sort of natural sunscreen, and we wish that parts of our upper atmosphere had more of it. Since we have an ozone "shortage" sometimes in the upper atmosphere, it is ironic that high ozone concentrations in the lower atmosphere contribute to photochemical smog.