So even though both cans of Irn Bru have exactly the same volume of liquid in them, the normal Irn Bru has more molecules (in this case sugar) dissolved in the liquid. This means that the sugar-free Irn Bru will float and the normal Irn Bru will sink. The more dense a substance is, the closer the molecules are inside that substance.
Density can also be affected by temperature and pressure. For example in warm air, the molecules have lots of energy and bounce about in space, knocking the other molecules about. So the spaces between the molecules are quite large, and the density is very low. However, in cold air the molecules don't have much energy so they don't bounce about in space very much and the molecules stay quite close together, so cold air is more dense.