Formation of the Ozone Layer. Over two billion years ago, early aquatic organisms called blue-green algae began using energy from the Sun to convert molecules of water (H2O) and carbon dioxide (CO2) and recombine them into organic compounds and molecular oxygen (O2).