Cooling and Shrinking
Soda is made up almost entirely of water and a soda bottle explodes in the freezer because of the way water behaves. Due to the motion of molecules, most substances contract when they are cooled, but water expands as it freezes. The force of the expansion is enough to burst most containers, including soda bottles and cans.
Ice, the Exception
Water is unusual in that it expands when to freezing temperatures. The hydrogen atoms in a water molecule are attracted to the oxygen atoms in neighboring water molecules, forming a rigid, crystalline structure. This structure takes up more space than free-moving water molecules do, causing the ice to expand. This is why ice floats on water; the density of ice is lower than water, causing it to rise to the top. The sugar, carbonation and other substances in soda cause it to freeze at temperatures a few degrees colder than pure water.
Soda bottles and cans are designed for a certain volume of liquid. As the water expands inside the container, the bottle strains and ruptures. When the liquid inside is only partially frozen, the rest of the liquid soda can then leak out and make a huge mess in your freezer.