The number of electrons in an atom's outermost valence shell governs it's bonding behavior. The octet rule is a chemical rule that reflects observation that atoms of main group elements tend to combine in such a way that each atom has eight electrons in its valence shell.