Why are elements on the right side of the periodic table nonmetallic and gas at room temperature?
The elements on the left-side of the periodic table are relatively electron deficient (i.e., they have few valence electrons), and due to their comparatively low effective nuclear charges (the net positive charge of the protons minus the shielding core electrons below the valence level), their electrostatic hold on these electrons are weak. Consequently, the electrons of metal atoms tend to be highly delocalized, not forming localized covalent bonds or possessing tightly held lone pairs. In metals, the electrons are effectively shared between many atoms, loosely bound in what is often described as an electron "sea," and the atoms of metals arrange to achieve maximally efficient packing in a crystal lattice, through which the electrons (particularly the most extensively delocalized electrons in the s and p orbitals at the highest main energy level) move freely. The tight packing of the crystal lattice accounts for the density and hardness of metals, while the extensive delocalization of electrons partially explains their malleability and conductivity.

Elements further right on the period table, on the other hand, have higher effective nuclear charges and stabilize electrons more effectively, leading to localized covalent bonding and the formation of molecules (vs. the ionic bonding and crystal lattices of metals). Electrostatic intermolecular forces of attraction are generally weaker than ionic bonding or delocalized metallic bonding, so non-metals and molecular compounds are more likely to exist in the liquid or gaseous phase at comparatively low temperatures than metals or ionic compounds.