Since the water freezes, I assume the temperature is below 0°C. The free energy goes down as the water freezes. Here are the important terms:
The energy of the interactions between the water molecules goes down as they line up in the stable ice positions. This lost energy flows out into the environment as heat, increasing the entropy of the environment.
The entropy of the water molecules goes down because their positions and orientations are constrained by the crystalline structure.
So long as T<0°C, the entropy gain of the environment beats the entropy loss of the freezing water, so the water freezes.
Equivalently, the free energy U-TS (where U is the water energy, S is the water entropy, and T is the absolute environment temperature) goes down on freezing so long as T <273 K (the same as 0°C).
Mike W.
(published on 03/26/2010)