|MadSci Network: Chemistry|
The temperature of maximum density is 3.98 C (or 39.16 F)when the density of "air free" water is 1.00000 g/cm3. It is less dense at both colder and warmer temperatures.
As to why, this has to do with the molecular structure of water and its bonding interactions with its neighbours. I am not sure whether you will have discussed "hydrogen bonds" but if you can imagine the water molecule as a "v" with the oxygen at the point and the hydrogens at the tips, then there are two lone pairs of electrons dangling from the oxygen. (A better picture might be an "x" but, in fact, it is a "tetrahedral" arrangement for the atoms and lone pairs.)
water molecule water molecule showing Oxygen's lone e- pair .. O O / \ / \ H H H HWater molecules interact by the hydrogen atoms of one molecule joining or bonding to the lone pair of the next. This is called a "hydrogen bond". It makes for a very complex network of interactions. Each water is holding onto two other and is being held by two other water molecules. At least, that is what happens in a "perfect" ice lattice. All of the water molecules are arranged in a complex, 3-D grid of interactions.
In liquid water, some of the molecules "fill in" the holes created in the lattice. In effect, they occupy the space between the surrounding water molecules. The result is that there are more per unit volume - and the water is "more dense". Now, the reality is that they don't "fill in" the holes but disrupt the lattice to allow more water into one area and this is not something that can happen indiscriminately so the density of water is only slightly more than ice. Furthermore, it is subject to normal heat fluctuations which disrupt the structure - which is why water gets less dense above 3.98 C. But it is a rough explanation of what is going on.
There are several good books discussing this and most first year chemistry text books have a section on "hydrogen bonding" with water's lattice as an illustration. It is a visual thing that is probably best seen, but hopefully this answers your questions.
Try the links in the MadSci Library for more information on Chemistry.