Exceptions to the Octet Rule

The octet rule is a bonding theory used to predict the molecular structure of covalently bonded molecules. Each atom will share, gain, or lose electrons in order to fill outer electron shells with eight electrons. For many elements, this rule works and is quick and simple to predict the molecular structure of a molecule.
"Rules are made to be broken" is the old saying. In this case, the octet rule has more elements breaking the rule than following it. This is a list of the three classes of exceptions to the octet rule.

Too Few Electrons - Electron Deficient Molecules

This is the berylium chloride and boron chloride Lewis dot structure
Todd Helmenstine

Hydrogen, beryllium, and boron have too few electrons to form an octet. Hydrogen has only one valence electron and only one place to form a bond with another atom. Beryllium only has two valence atoms, and can only form electron pair bonds in two locations. Boron has three valence electrons. The two molecules depicted in this picture show the central beryllium and boron atoms with fewer than eight valence electrons.

Molecules, where some atoms have fewer than eight electrons, are called electron deficient.

Too Many Electrons - Expanded Octets

This is a collection of sulfur Lewis dot structures.
Todd Helmenstine

Elements in periods greater than period 3 on the periodic table have a d orbital available with the same energy quantum number. Atoms in these periods may follow the octet rule, but there are conditions where they can expand their valence shells to accommodate more than eight electrons. 

Sulfur and phosphorus are common examples of this behavior. Sulfur can follow the octet rule as in the molecule SF2. Each atom is surrounded by eight electrons. It is possible to excite the sulfur atom sufficiently to push valence atoms into the d orbital to allow molecules such as SF4 and SF6. The sulfur atom in SF4 has 10 valence electrons and 12 valence electrons in SF6.

Lonely Electrons - Free Radicals

This is a Lewis dot structure for nitrogen(IV) oxide.
Todd Helmenstine

Most stable molecules and complex ions contain pairs of electrons. There is a class of compounds where the valence electrons contain an odd number of electrons in the valence shell. These molecules are known as free radicals. Free radicals contain at least one unpaired electron in their valence shell. In general, molecules with an odd number of electrons tend to be free radicals.

Nitrogen(IV) oxide (NO2) is a well-known example. Note the lone electron on the nitrogen atom in the Lewis structure. Oxygen is another interesting example. Molecular oxygen molecules can have two single unpaired electrons. Compounds like these are known as biradicals.

Summary of Exceptions to the Octet Rule

While Lewis electron dot structures help determine bonding in most compounds, there are three general exceptions: molecules in which atoms have fewer than 8 electrons (e.g., boron chloride and lighter s- and p- block elements ); molecules in which atoms have more than 8 electrons (.e.g, sulfur hexafluoride and elements beyond period 3); molecules with an odd number of electrons (e.g., NO).