In an atom, I always hear that it want's to have a valence shell containing 8 electrons, why?
Because of Pauli's exclusion principle (http://en.wikipedia.org/wiki/Pauli_exclusion_principle) no more than one electron with a certain set of qauntum numbers can occupy the same space. For an atom the important quantum numbers are n, l and m and spin.
These quantum numbers can only be integers. below I will denote the restrictions on these quantum numbers that follow from the theory that describes atoms: Quantum mechanics.
n=1,2,3,... determines the energy and size of the atom. It is called the principle quantum number. The higher n the larger the energy of the atom.
l=0,1,2,...n-1 determines the shape of the atom (for n=1 l can only be zero wich means the electron has a spherical distribution, a hydrogen atom eg) it is called the angular momentum quanum number
m=-l, -l+1,...,-1,0,1,...l-1, l it is called the magnetic quantum number
Now the lowest energy state in an atom is the one with n=1; from the restrictions given above this means l=m=0. An electron can have two values of spin wich is another quantum number. So Pauli's exclusion principle allows two electrons to occupy the region given by n=1. This is called the ground state of an atom.
Now if you want to add another electron you will have to do so at with a different number n. Nature always tries to use as little energy as possible, so the natural next step is n=2. You eneter a new 'shell'. There are few possibilities for the other quantum numbers now. l can be 0 (with m 0) or l can be 1 with m -1, 0 or 1. Each of these possibilities can have two electrons so in the n=2 shell there is room for 8 electrons.
By adding another electron, by Pauli's exclusion principle, you will have to go to yet another higher value of n. This will higher the energy appreciable. So from 7 to 8 electrons in the valence shell costs less energy than adding another electron for wich you have to go to a higher number of n.
You can picture this by realising n also alters the expectation value of the distance to the nucleus of a shell. For small n the electrons are close to the nucleus (and thus have a small energy, as they are tightly bound to the nucleus!). For larger n the expectation value of the distance to the nucleus will increase and thus the electrons with this large n will be only loosely bound (also because some of the inner electrons are shielding the nucleus charge).
So you see, it is not only 8 electrons in a valence shell that nature likes. But the numbers 2,8, 20 etc . These are called magic numbers.
Maximize the screen, sorry it came out a little fuzzy.
God said, "Let there be eight." Then he realized he misspell the word. He tred again, "Let there be light", and there is light. (and also eight)
Simply because that allows for the lowest energy, i.e. most stable configuration. It has to do with the QM of the atom and the cost of losing or gaining an electron.
If you go on to study inorganic chemistry, you'll find out that d-orbitals play a significant role and now there is a general "18-electron rule". The 18 electron rule has to do with the number of electrons in bonding orbitals (b.o.) and antibonding orbitals. In most complexes, the # of electrons in b.o outnumber the # of a.b.o., and the complex is stable. (Anitbonding orbitals are higher in energy --> unstable).
This is analagous to the 8-electron rule. More bonding e- and less antibonding e-.
Read this posts and especially Hund rules
There is an explanation for everything inside an electron structure of an atom.It's called Quantum Mechanics.
Separate names with a comma.