Photosynthesis is the process used by algae, green plants and some types of bacteria to convert solar energy into chemical energy. During photosynthesis, carbon dioxide (CO2) is consumed and oxygen (O2) is released. In the primitive Earth, the photosynthetic marine organisms helped to replace atmospheric CO2 with O2, which was one of the most important gas components in the atmosphere. Moreover, the ozone (O3) is generated when O2 reacts with sunlight. In the stratosphere, this gas (O3) formed a layer that is capable of filtering ultraviolet harmful radiation.