It stores energy through chlorophyll that comes from sunlight.
By definition, energy can be neither created nor destroyed. Therefore all energetic reactions are described as either storing or releasing energy. Photosynthesis uses a chemical reaction involving chlorophyll to store energy gathered from electromagnetic radiation (sunlight).