Where does the energy stored in glucose come from

The energy stored in glucose comes from the sun, as plants use sunlight to convert carbon dioxide and water into glucose through a process called photosynthesis. This glucose is then stored in the form of sugars within the plant's cells and can be used as a source of energy for the plant or for other organisms that consume the plant.