The energy in glucose is stored in the covalent bonds between the molecules, and most importantly, in the hydrogen electrons.
The hydrogen electrons were boosted to a "higher energy level" in the process of photosynthesis (which is transfered by plants from sunlight) during the photosystem I in plants.
These hyrogen electrons will than pass through the electron transport chain during aerobic cellular respiration, and the hydrogen ions become stable.