This is one of the AGW skeptic's FAQs. They often quote that it gives 98% of the greenhouse effect, and only 2% for CO2, but this is an unsubstantiated factoid. It has no science to back it up*.
Even so, water vapour is the most important greenhouse gas, accounting for 33-66% of the total greenhouse effect, or 66-85% if we include clouds. CO2 accounts for 9-26%, and the other greenhouse gases (ozone, NO, methane) for 7-8% of the effect.
This is only the beginning of the story though.
Water vapour has a short residence time in the atmosphere - about 10 days, compared to decades or centuries for CO2, and decades for methane. This means that if the atmosphere is cooler, water vapour condenses, and falls as precipitation. If the atmosphere warms, more water vapour can be held, and its greenhouse effect goes up.
In short, water vapour is a passive component of the greenhouse effect, acting as a feedback to amplify whatever else is going on.
More on Real Climate
*Stefan, commenting on the Real Climate link above, says
I’ve seen a slightly different “98%” argument made by climate skeptics (e.g., U. Berner in various popular brochures and articles): “98% of the greenhouse effect is natural and only 2% anthropogenic”.
This is because the anthropogenic greenhouse gas forcing (~2.4 W/m2 until now, here IPCC is cited) is only ~2% of the total (“natural”) greenhouse forcing.
What these people usually leave out, of course, is that the natural greenhouse effect warms the surface temperature by ~33 ºC (all else being equal, notably albedo).
A rough and linear back-of-envelope estimate of how large the 2% anthropogenic change in greenhouse effect might be: 2% of 33 ºC is ~0.7 ºC, very similar to what the more detailed and correct calculation gives.
So, there is nothing wrong with this version of the 2% argument – except that it is often used in a context and in a way designed to mislead the public, i.e., it is used to suggest to a lay audience that “global warming is 98% natural”, so we are not responsible and can’t do anything about it.
Update 3.1.10: stratospheric water vapour may act as a negative feedback.
Climate change FAQs.
Warming oceans produce less clouds above them.