How does water vapor affect the earth's temperature?
Water vapor is the most powerful and most important greenhouse gas - 95% of greenhouse gases are water vapor.
As temperature rises, more water is evaporated (from oceans) leading to an excess of water vapor in the atmosphere. This atmospheric vapor acts like a blanket (or greenhouse), further warming the surface, causing further evaporation, etc.
This is an example of a positive feedback mechanism.
Water vapor amplifies the effect of CO2 warming by a factor of 2.
Unlike CO2, which is added artificially to the atmosphere. Water vapor atmospheric content is linked to temperature as part of the natural hydrological cycle. This article provides an excellent overview into the links between the hydrological cycle and global warming/climate change.
If you have access to academic journals, I would recommend the work of Soden (2001 and 2005) on coupled ocean-atmosphere models and research.