Short answer: Energy is stored in the chemical compound,
Long answer: Energy is stored in many ways when speaking about chemical compounds. First, think about Energy as it is. Generally speaking, it has a kinetic component and a potential one.
Kinetic energy of compounds is measured macroscopically by temperature: their average speed (usually when speaking about gasses) determines some of its properties such as temperature and pressure.
On the other hand, potencial Energy involves different ways in which the molecules can vibrate, rotate, interact with external fields (gravitational, electromagnetical…). It is in this several “modes” that compounds “store” energy.
Now, think about bond formation. If you take an H atom, it can mainly rotate, but its vibration is null, whereas an H2 molecule can rotate AND vibrate. In fact, you could say that it has only one vibrational mode. H2O can vibrate in more ways than H2. It has simmetric and assimetric stretching, it can vary it's angle in what is called bending and several more vibration modes. Why is this important? Because when you have more modes in which to store potencial Energy then your molecule has very different properties, such is its Cv or Cp (Heat Capacity), luminescence properties and so on.