I recently read "H2O: A Biography of Water" by Philip Ball. A very interesting book about a fascinating topic. The following is condensed from this book.
The structure of liquid water is determined more because of the attractive forces between the hydrogen bonds rather than the repulsive forces between molecules. Because the attractive forces are much stronger than the repulsive forces, the packing constraints are considerably lower for water than for other liquids, so the molecules pack more densely. The hydrogen-bonded network in liquid water is dynamic and disordered. When water freezes the hydrogen-bonded network locks into a rigid crystal lattice, and the upshot is that the space between adjacent molecules increases. So the density of ice is less than that of liquid water, and so ice floats. There are 13 different ice structures that have been identified to date, synthesized by varying the temperature and pressure during freezing. Ice-VII remains solid at temperatures above 100 C and has a density about 2 times greater than ice-I (normal ice).