Why is osmium the densest known element?
The density of an element is related to how many atoms can be placed in a given volume and the weight of the nuclei.  Therefore, the smaller the atomic radius of an atom and the higher the atomic number of the nucleus, the greater the density of the element. The very small atomic radius of osmium results in a small metal-metal separation.  This small atomic separation along with osmium's relatively high atomic number gives rise to osmium's high density.

The small atomic radius can be attributed to the following factors:


f orbitals are very diffuse and therefore result in poor screening of the electrons further out.  In the case of osmium ($\ce{[Xe] 4f^{14} 5d^6 6s^2}$) the poor screening by its 4f orbitals leads to a contraction in the n=5 and n=6 orbitals.
Due to osmium's high atomic number, relativistic effects come into play.  These relativistic effects have been discussed previously on SE Chem for gold and mercury.  A general discussion as well as the mathematics describing the relativistic effect can be found in these earlier posts.  Basically, for heavy nuclei the s electrons must circulate at relativistic speeds in order to maintain a stable orbit (not fall into the nucleus).  Therefore the electron mass increases and the s orbital radius decreases (the p orbital radius also decreases, but to a lesser degree). 


The orbital contraction caused by these two effects leads to a small atomic radius for osmium.  Therefore, short metal-metal bonds result.  This is reflected in the small unit cell volume for osmium (27.96 cubic angstroms).  For comparison the unit cell volume for lead is 121.3 cubic angstroms! As a result, more osmium atoms can pack into a given volume compared to other elements

Osmium's relatively high atomic number along with its small atomic radius, as explained above, gives rise to osmium's high density.