Notice how all the carbon atoms in glucose (a sugar) have oxidation states
of -1, 0 or +1, while all but one carbon atom in palmitic acid (a
fatty acid) have oxidation states of -2 or -3. This means that the
carbon atoms in fatty acids have more electrons around them. As
described in the Electrochemistry tutorial, when electrons move
from an atom with a low affinity for electrons (low electronegativity),
like carbon, to one with a high affinity for electrons, like oxygen,
energy is released. Therefore, when the greater number of electrons
around the carbon atoms in fatty acids are transferred to oxygen
(when the fatty acids are oxidized), more energy is released
than when the same process happens to carbohydrates.
See the Electrochemistry tutorial for more information about oxidation and reduction.