Photosynthesis is carried out by green plants (those with chlorophyll to capture light) and is a process of converting light energy from the sun to chemical energy. The chemical energy is stored in the form of molecules that heterotrophic organisms use as source of energy when they eat plants.
In general, photosynthesis occurs using starting materials, light, carbon dioxide, and an electron donor. The electron donor is necessary to push the reaction forward. The resultant materials are carbohydrates and an electron acceptor, usually oxygen gas, which is a by-product of photosynthesis. The carbohydrate stores the energy, in the form of chemical energy, which is what other organisms consume.
When glucose is produced (which is the typical representation of photosynthesis), the equation is:
`CO_2 + H_2O rightarrow C_6H_12O_6 + O_2`
Hence, in this case, energy is stored as glucose, which is digested to get the energy needed by other organisms. In general, however, the energy is stored as chemical energy in the form of carbohydrates.