A soda can may explode in a cold car if enough carbon dioxide gas builds up inside the can. Carbon dioxide is forced out of frozen soda as water molecules undergo crystallization. The buildup of carbon dioxide in the small remaining space causes the can to explode.
The expansion of water molecules as they freeze is a contributing factor, but the actual explosion would not occur without carbon dioxide. Even short freezing times can build up enough carbon dioxide to detonate the can once it is opened. This is why freezing soda or any other carbonated beverage is not recommended.