This is because in liquid state water molecules are close to each other, but in an disorganised manner. Each water molecule forms around 3.4 hydrogen bonds with other water molecules.
However, in solid state, water molecules form exactly 4 hydrogen bonds (maximum hydrogen bonding capacity) with other water molecules. By doing so, they arrange into a lattice structure and get distanced from each other, in order to be able to form the 4 hydrogen bonds with each other. Thus, there are less water molecules in the same volume, as compared to the liquid state. Therefore, there is less mass in the same volume, i.e ice is less dense.