How do greenhouse gases trap heat? I am looking for a molecular-level understanding of the greenhouse effect.
What is it about the carbon-dioxide molecule (and methane, and water, etc) that is different from other gasses (particularly, N2 and O2) such that it works in the atmosphere to trap heat? 
Is it, say, the distance between nuclei in the molecules relative to the wavelengths of infrared light? Dipolarity of the molecule? A combination of various factors?
 A: To absorb infrared light, a stretching or bending vibration of the molecule must change the molecule's dipole moment.  In $N_2$ and $O_2$ there is no dipole moment regardless of how you stretch the bond. On the other hand, O=C=O can change dipole moment by the C moving toward one O and away from the other O, or by bending with the C becoming a vertex of an obtuse angle.  Water and methane molecules can also change dipole moment.
A: IR emission and absorption for major Greenhouse Effect gases.  Note that adding more absorbance to as saturated line (A greater than ~2, less than 1% tranmission) increases absorbance by log[concentration] not Beer's law [concentration].  ALWAYS look at the wavelength scale and the tranasmission or absorbance scale.  The open transmisison windows are marvelously filled by HCFCs that were supposed to mitigate the Greenhouse Efect.  Oop$ie.

(source: theresilientearth.com) 

A: While the above is true, the atomic nuclei of a composite gas do not line up neatly in nature such that O2 and N2 are neutral in terms of "trapping" heat energy. In fact the physics of light refraction or bending, scattering and altering wavelength in that process still takes place in our atmosphere the GHG value of Strictly N2 and O2 combines for approxmately 36 x the energy trapping value of H2O in our atmosphere.
Taken to the next step, water is 100 x as common in the earth's atmosphere as CO2 (ppm).  However, AGW alarmists always fail to convert (I believe with intent) the ppm equivlency appropriately to weight equivelancy. Weight equivelancy ratios and their effective absorption properties is what really matters when comparng the properties of the varios GHGs.  You see from the experiments that lead to all the graphs and charts above, we know that a CO2 molecule has just about 2 x the energy trapping value (HTEV) of an H2O molecule.  In terms of excitation, it bounces around with more absorbed heat converted to a kenetic motion state at about 2x the rate of a water molecule.   
What AGW alarmists purposely forget is that the size and mass of each molecule is quite different. CO2 has an atomic weight of about 44 and H2O has an atomic weight of about 18. That means CO2 is 2.4444 x the size of H2O.  CO2 is a pretty big compound compared to water.  So if the actual HTEV of CO2 = 200.91% of H2O, THEN an = amount of H2O by weight must = 2.4444 H2O molecules. That makes water by equivelent weight displacement roughly 121.58% as effective a GHG as CO2 in medium to long wave lengths (across spectrum). Furthermore, the fact that water outnumbers CO2 by about 100 molecules to 1, makes water about 41 x as common in the atmosphere by weight. 
At 121.58% the HTEV by weight this makes water about 50 x as important w GHG as CO2.  We could just round off the addition of both and say 49:1 for a value of 50 HTEV units within atmosphere. 
But the cumulative HTEV for O2 and N2 still combine by comparison for 36 x the value of all water and CO2 combined. Doing the simple math, it means CO2 in the atmosphere lends about 1/(50 x 36) or 1/1800 of the reason the the atmosphere is warm at all.  That is simply not relevant. 
The reason charts and graphs like those above are important is that they demonstrate the value of each type of molecule in terms of their respective HTEV properties in various wavelengths. But the charts are not demonstrating their cumulative values as component gases within the atmosphere relative to their cumulative HTEV's as actual ratios found in the environment.  
One more fact. The charts clearly demonstrate that the shorter the wavelength (i.e. UV light) the more energy is absorbed by O2 and O3.  The same is true for N2. To say the absorption properties of these gas components is less important because they collect solar radiation in mostly the upper range post visible ignores the more simple physics of kennetic energy.  The attition of excitation energy is still converted energy.  These gases are still the most important reason the atmosphere is warm...hence the calculation of the importance of them in terms of cumulative HTEV relative to just the 4% of the Atmosphere that makes up water and a trace of CO2. AGW alarmists conveniently ignore this reality, or center their modeling arguments on LWL radiation absorption while ignoring total kenetic excitation within the system. To ignore that is bad science...perhaps even fraud.  To try and make CO2 the danger of global overheating is like saying you could cut a 6"square corner from you bed cover in winter, toss aside the heat trapping properties of the other 7 square feet by throwing it on the floor and then hoping to stay warm by placing the 6"square on top of your kneecap.  
To summarize: I've demonstrated that while CO2 has about 2x the HTEV of water at the molecular level, it is actually less effective a GHG when appropriately measured by weight equivelancy.  Because the atmosphere contains on average 40 x as much water in than CO2, water has essentially 50 x the influence on climate as CO2.  Water and CO2 combined only account for 1/36th of the reason the Atmosphere retains heat. At just 1/1800th of the reason the Atmosphere retains heat, CO2 can simply not be statistically relevant to climate change other than the fact that in cycle, a warmer earth and ocean during interglacials such as the present Holocene, should lead to higher CO2 levels in the atmosphere even without humans.  Warmer ocean surfaces evaporate more CO2 into the air than smaller, colder oceans do during ice ages. From these simple facts of physics and math one can readily see that AGW alarmists are perpetrating a hoax. 
