All of the above. Consider water molecules in the gas phase, the liquid phase and the solid phase. There are two bonds, one to each H atom, regardless of the physical phase. As ice forms or as ice melts, much energy is taken out of or put into the system without raising the temperature. Thus, ice helps keep the planets temperature constant.
Snow insulates the earth by helping reduce the rate at which energy can escape into space.
Boiling water produces large amounts of energy which are used to warm the planet. As water goes from the liquid to gas phase, much energy is put into or taken out of the system without changing the temperature. Thus, vaporization of water helps keep the planets temperature constant. This helps keep the planet more comfortable to life. How water molecules interact with molecules with O-H groups, thus helping the molecules dissolve in water.