Plants use energy from the sun to produce foods which are very rich in energy. The food are mostly in form of sugar and they can be converted to starch for storage.
When plants needs energy, they undergo a process called cellular respiration in which the food that is stored is combine with oxygen in order to release energy for plant use. This show that the compounds that are produced during photosynthesis contain energy.