its because Oxygen has 2 unpaired electrons. These therefore mean that oxygen becomes slightly negatively charged (aswell as the fact that the probability of finding electrons closer to the oxygen is greater than the other way round). This gives oxygen a slightly negative charge (or delta negative) and hydrogen a slightly positive charge (delta positive). because of this each hydrogen atom is attracted to an oxygen atom of another molecule. This explains cohesion between the molecules and also the abnormaly high boiling point of water. it easily dissolves ionic compounds as these can also form temporary bonds between the water molecules. This also explains why the latent heat of water is huge 4.2kjkg-1k-1 (this is the amount of heat energy ,in kelvin, 1kg of water can absorb) this explains why burns from boiling water are very painful