The density of a substance is its mass per unit volume, usually measured in g cm. The graph below shows the variation in density (at room temperature) across Period 3.
Na, Mg and Al have metallic bonding which is the attraction between the delocalised outer shell electrons and the fixed positive ions. The greater the number of outer shell electrons the greater the charge on the positive ion and so the greater the attraction. This means as we go from Na to Mg to AI the metallic bonding becomes stronger and the ions are pulled more closely together, leading to an increase in density.
Phosphorus and sulphur atoms are heavier than silicon atoms so we might expect their densities to be higher. However silicon is a giant covalent network of tightly packed atoms whereas the P4 and S8 molecules are only loosely held by Van Der Waals forces, so they are further apart.
Chlorine and argon are gases at room temperature. The chlorine molecules and argon atoms are well spread out so their densities are very low.