Light energy (from the sun) is used to convert carbon dioxide and water into glucose and oxygen in the process of photosynthesis.
carbon dioxide + water --> glucose + oxygen
the light energy from the sun is then trapped in the glucose. in order to retrieve the chemical energy stores within the molecule, the bonds have to be broken.