How does an energy input actually change a molecule? I'm reading an online biochemistry textbook for fun, and a question that has bothered me on chemistry before popped up again. The question here is not specific for the chemical process described, but I needed an example:

By adding energy to a molecule of formic acid ($\ce{CH2O2}$), it kicks out an O and becomes formaldehyde ($\ce{CH2O}$). More energy makes it methanol ($\ce{CH3OH}$), and more energy makes that methane ($\ce{CH4}$).

I get that energy allows the molecule to become a different molecule of a higher energy state; it essentially stores the energy as new or altered chemical bonds. What I never understood is why? It is natural for the molecule to try to go to a lower energy state, releasing energy in the bonds, as it does under oxidation/"burning". So why doesn't it just immediately release the added energy, rather than store it in bonds? 

What prevents the formaldehyde from saying "I see your energy, but I'll just do what's easier for me and release some of my own, and become formic acid"? After all, no matter how much energy I use to blast a block of stone into the air, it's going to fall down again, unless someone up there catches it. What's "catching" the higher-energy molecule and preventing it from "falling back" into the more stable, lower-energy molecule?

The answer seems like it might be leaning on atomic theory more than chemistry, but I thought I'd give it a shot here.
It is about transition energy barriers.

Imagine a mountainous landscape with lots of valleys of different depths. Stable molecules are large balls than sit in the bottoms of the valleys. Add some energy and the ball might rise up the valley floor but it will fall back. Add enough energy and the ball can rise high enough to get over the barrier to the next valley and will fall into a different place with a different depth (and the analogy falls down as it also becomes a different ball). So, whatever the relative depths of the valleys, there is a big barrier to getting from one valley to another. Even when one valley is much lower than another (so moving from one to another releases energy) you still have to put energy in to cause the transition.

Chemical reactions are often controlled by those transition barriers between one molecule and another rather than by the absolute energy difference between the molecules. Methane and oxygen will burn to give various compounds and will release energy, but there is a big barrier to starting the burning process. This means that the deoxygenation reactions you describe are possible and won't spontaneously reverse even though they would release energy if they did.