What is the quantum mechanical explanation of the octet rule? What is the quantum mechanical explanation of the octet rule? In other words, what makes the octet rule be true from a quantum mechanical view? How we explain  what makes some atoms don't follow the octet rule using QM?
 A: An answer I found on Yahoo a long time ago: 
A complete and precise answer will vary a bit depending on what atom in what situation you're talking about. (For example, in the gas phase, a sodium cation $\text{Na}^+$ is NOT more stable than a neutral sodium atom -- the ionization energy of neutral gas phase sodium atoms is a positive number, so that change is uphill and endothermic. In that sense, the octet rule isn't true. As you point out, it's not true for the $d$-block, and lots of $p$-block elements break it all the time anyway.) 
Let's take the simplest case of a noble gas atom, like neon. The valence configuration is $2s^22p^6$, closed shell, complete octet, both stable (in the sense that it it cannot, by itself, turn into anything else that is thermodynamically downhill) and unreactive (in the sense that there is nothing with which it can chemically combine to form new molecules that are energetically downhill). 
Why? 
A noble gas has, as you state, four atomic orbitals in that particular shell. They aren't the same energy (the 2s are below the 2p), but those orbitals are both far far higher in energy than the n=1 and far far lower in energy than the n=3. At the same time, Ne has more protons (10) than any other element with an n=2 valence shell, and a higher Z means that the electrons in Ne experience a higher Zeff (effective nuclear charge) than any other element in that row. 
The phrase "atoms want 8 electrons" really means "atoms seem to form compounds that allow them to put 8 electrons into their 4 valence orbitals, either by giving electrons away to form a cation, taking electrons to form an anion, or sharing electrons to form a covalent bond". 
Neon won't do any of those things. 
Its Zeff is the highest in the row, so the ionization energy is the highest in the row. It won't form cations, because it takes far more energy to remove electrons than you could get back via the electrostatic attractive forces in an ionic complex. There's no stable complex of [Ne]+, because making [Ne]+ costs too much, because the Zeff and ionization energies are too high. 
Neon won't form anions, either, because making [Ne]- requires adding an electron to the much higher energy n=3 shell. That's also uphill, and again that's too much of an energy cost to regain. There's no stable complex of [Ne]-, because making [Ne]- costs too much, because the n=3 is too high in energy and the electron affinity is too unfavourable. 
And Ne won't share. Its electrons are already in low-energy orbitals, the lowest energy orbitals of any n=2 element, and they are all full. So the usual driving force for covalent bonds -- overlap two half filled orbitals to put both electrons in a more stable bonding interaction -- doesn't work. Any covalent bond you formed with neon would require the overlap of a full orbital, resulting in partial population of antibonding MOs, which is too destabilizing. 
So neon won't give 'em, won't take 'em, and won't share 'em. Strike three, no way to bond, no compounds. You're stable. 
For elements not in Group 18, at least one of the scenarios above is a good idea. Sodium has a low ionization energy -- uphill, but not too far -- so that the electrostatic attractive forces in an ionic complex make the formation of [Na]+ a net downhill process. Fluorine or oxygen have either slightly favourable electron affinities to make [F]- or [O]2-, or, again, uphill by small enough amounts that ionic complexes are overall downhill. Or they can share: overlap the singly-occupied orbitals with other singly occupied orbitals from other elements to form covalent bonds until all the singly occupied orbitals have a bond. That will lower the energy of those electrons and fully occupy every orbital -- fewer bonds (less than an octet) would leave some orbitals at least partially empty, so there are spots you could add more electrons to further lower the energy of the system, while more bonds would require orbitals you don't have available. Net result, elements usually share to form the octet, and then stop. 
Basically, it comes down to the orbital energy structure you already understand. Filling the valence level, either by taking or sharing electrons, is downhill, adding to the one above it is uphill. 
A: For the first rows in the periodic table, this can easily be explained by the fact that electrons possess four quantum numbers (usually $n$, $l$, $m_l$ and $m_s$). These numbers are restricted as such:
$$
n = 1, 2, 3, ...
$$
$$
l = 0, 1, 2, ..., n - 1
$$
$$
m_l = -l, -l + 1, ..., 0, ..., l - 1, l
$$
$$
m_s = -\frac{1}{2}, \frac{1}{2}
$$
By Pauli's exclusion principle all of these numbers can't be the same for any two electrons in an atom.
So in the $n = 2$ shell you can have two possible values for $l$, one possible value for $m_l$ when $l = 0$, three possible values for $m_l$ when $l = 1$, and two possible values for $m_s$. This sums to a total of eight possible value vectors: $(1 + 3) \cdot 2 = 8$.
In the $n = 3$ shell the eight rule also holds true for $l < 2$, which gives you sort of the same combinatorics all over again.
Since the quantum numbers cannot be the same for any electrons in an atom adding an extra electron to an atom with eight electrons in its outermost shell forces the electron to occupy a state with a higher principal quantum number ($n$), and since the binding energy of the electron increases with $n$ this is energetically unfavorable to binding with an atom that has more space in its outermost shell.
For further reference $n$ is the principal quantum number (dealing with energy states), $l$ is the orbital quantum number (dealing with subshells), $m_l$ is the orbital magnetic quantum number (direction of $l$) and $m_s$ is the spin quantum number (direction of spin).
A: Long story short, the octet rule arises, because for every principal quantum number $N$ you have a stack of energetic sublevels, distinguished by angular momentum $l > n$. For $l = 0$ we have 2 states, for $l = 1$ we have 6.
Higher angular momentum states carry higher energy, so it is energetically prefereable to fill the low angular momentum states of the higher principal quantum number before filling the $l = 3$ states. But the DO get filled eventually, giving rise to the d-block elements (the angular momentum states are dubbed 's' for $ l = 0$, 'p' for $l = 1$, 'd' for $ l = 2$).
The energy gap between a filled p-shell and opening a new s-shell is so large, that it is energetically unfavored, and this is the origin of the octet rule:
P-shell configurations are eneregetically (a lot) more favorable than s-shell configurations with a higher pricipal quantum number or d-shell configurations.
This does not stop at $l = 2$ btw. a few more protons and also the $l = 3 $ shell gets filled, giving rise to the f-group elements. But in between, there is always a s-shell being filled first and a p-shell being filled afterwards.
