The number of electrons in an atom's outermost valence shell governs its chemical properties. Elements react to form a closed shell, corresponding to the electron configuration s2p6 . This tendency is called the octet rule, because the atoms have eight valence electrons.
I hope this helps you ! ;-)