The various photosystems depend on the sunlight to prepare food. These photosystems are known as the autotrophs. The unicellular autotrophs like the cynobactera have the chlorophyll pigment in their body. This pigment absorbs the energy from the sunlight to cause a reaction between the absorbed carbon dioxide and water to form glucose and oxygen. Oxygen gets released into the atmosphere as a byproduct of the reaction. In cynobacteria there is no defined place for the storage of glucose. But in higher multi-cellular organisms like plants, the storage happens in the stalk of the leaves.
In evolutionary biology, convergent evolution is defined as the process whereby distantly related organisms independently evolve similar traits to adapt to similar necessities.