It would indeed need lengthy explanations... A few hints:
On Earth, atoms use to organize in molecules. There are very few lone atoms.
Chemical reactions are rearrangements of the atoms, destroying some molecules (or more generally species) to form other ones. When the bonds in the new molecules are stronger, energy (like heat) is released.
Reactions are possible when an easy path exists, often over many intermediate species, to avoid every intermediate that needs a high energy hence would be highly improbable. For instance, you won't see any atomic C in the reaction from glucose to carbon dioxide. Chemical synthesis is much the art of finding such paths. Living matter is incredibly efficient at conducting reactions, sometimes very difficult ones, under very lenient conditions. Writing one arrow from glucose to carbon dioxide neglects all these intermediates.
O=O has rather weak bonds, weaker than N≡N, C=O or two H-O for instance, and this explains much why the combustion of hydrocarbons or sugars releases energy. O2 must first be produced, and exists on Earth thanks to photosynthesis, using light provided by the Sun. Making cheap O2 from light and CO2, H2O is just one example of a reaction badly difficult outside biology.
Up-to-date theories tell that atoms share electrons in molecules, possibly with the electronic density increasing at some atoms, but not necessarily. Though, the older ideas of atoms losing or gaining electrons are still interesting because they're simpler hence more fertile.
The (older but useful) oxido-reduction would tell that in 6×O2, the electron-avid oxygen atoms receive no electron from their identical partners while in H2O and CO2 they do, so some C and H atoms get oxidized in the reaction, and this shall explain the produced heat.
Molecular orbitals instead tell that the orbitals formed in H2O for instance are more favourable than in hydrocarbons or sugars and in O2.