Basically it's because of two opposing forces: thermal kinetic expansion and H-bonding. One is the fundamental thermal force, that as things get warmer, the molecules move around more, so they get farther apart and so become less dense. The second force is hydrogen bonding. This occurs in water whereby an O of one molecule will form a weak bond with the H of a neighboring molecule. This causes a kind of hexagonal 3D lattice to form which eventually becomes the 6-sided structure of ice crystals. At 4 degrees C these two forces work out to make water the most dense. That is: the thermal properties are not enough to break all the h-bonds apart, but the h-bonds have not formed enough to widen the distance between water molecules to be as great as in ice (which is why ice is lighter than water).
Here's what everyone said on a particular chemistry email list where your question was posted: "Liquids generally become more dense as the temperature drops because molecular movements are slowing down, allowing the amount of intermolecular interactions to increase. As these intermolecular interactions of water increase, the local arrangements become more like the space-wasting structure of ice, in which each oxygen is surrounded tetrahedrally by four hydrogens." "Water is highly hydrogen-bonded both in the lattice, ice, and in the liquid state. When ice melts, the hydrogen bonds holding the O's in the solid diamond lattice open up and the structure partially collapses, enough to make a fluid, but considerable H-bonding remains and parts of the open, diamond like 3-D lattice remain. R. Gurney called the local structure of liquid water "ice-like." As the temperature rises, more H-bonds are loosened, or broken, allowing further collapse of the open semi-regular ice-like structure, AND more thermal motion ensues tending to open the separation between O's in more random way. Four degrees C happens to be approximately the temperature where these countervailing tendencies cross." [John N. Cooper, Chemistry Bucknell University] "The more vigorous thermal motion of molecules at higher temperatures increases their average distance from each other, promoting a decrease in the density (thermal expansion.) This increased thermal motion also disrupts the hydrogen bonding in water, tending to break up the more open structure associated with efficient hydrogen bonding and thus leading to an increase in its density." [Steve Lower, Simon Fraser University] As water cools toward 4 degrees C, the molecules can still move and vibrate enough to quickly break H bonds and thus can actually bump into each other in non-bonding orientations, that can closely approach and thus overall be more dense. Above 4 degrees C, the motion takes them farther apart and density decreases, as in any material. Below 4 degrees C, the molecules start to form stable H bonds that are actually longer that the van der Waals distances, so the density also decreases and ice expands as more and more H bonds are stabilized into the crystal lattice. The British film, "The Chemistry and Physics of Water" (Lever Brothers) does an excellent job of the graphics showing the H-bonding hexagonal shape which increases water's volume as a function of falling temperature versus the kinetic motion which increases volume as a function of rising temperature. Water is really special stuff, and we need to all be more appreciative of this marvelous environment we evolved in.
Réponse : L'eau au-dessus de 4C est un liquide qui est librement mobile autour d'où il y a peu d'effets des forces moléculaires. Car la température approche 4C, les molécules liquides viennent plus étroitement ensemble et ralentissent pendant que leur énergie cinétique diminue, les forces moléculaires (liaison etc. d'hydrogène) ont plus d'un effet maintenant et leur réunissent le closeer ; donc, le liquide est plus dense. Pendant que la température tombe au-dessous de 4C, l'eau commence à se commander pour regarder plutôt elle en tant que glace pleine. C'est-à-dire, elle prend une forme qui ressemble à un certain nombre de beachballs coincés ensemble. C'est également pourquoi la glace est moins dense que l'eau. La glace a un tas d'intérieur vide de l'espace ces structures de « beachball », tandis que l'eau liquide n'a pas cet espace ouvert.