The ozone molecule contains three oxygen atoms (O3). It's formed by the chemical bonding between a diatomic oxygen atom (O2) and a single oxygen atom. is less stable than ozone , because it wants to return to the diatomic state by giving up an oxygen atom.
Because ozone is an unstable molecule, the UV light breaks it easily. Then, a highly reactive oxygen molecule bonds with a diatomic molecule, forming ozone. This cycle repeats over and over.
Ozone (O3) may exist in the troposphere or in the stratosphere. In both, ozone's chemical structure is the same. Yet, stratospheric ozone is "good" for the Earth, while tropospheric ozone is harmful for the planet.