I can sort of understand why water is denser than ice, but for CO2 I cannot understand why it is the other way around. Here is my best shot at understanding it: I imagine H2O's solid structure as a hexagon due to the hydrogen bonds, where each point represents one atom. When these bonds are broken the six line segments separate from each other and now the liquid is just a compilation of these six line segments which is more dense. I imagine a CO2 solid as a set of squares fixed together. When it turns into a solid those squares remain in tact thus the substance does not become more dense. Does this sound right?