valence electrons are the number of electrons in the outer shell. there can only be 8 electrons in the outer shell. The number of valence electrons can be used to determine how many bonds are needed.
For example: H2O
O (oxygen) has 6 valence electrons
H (hydrogen) has 1 valence electron
O needs 2 more electrons to be stable
H needs 1 more electron to be stable
O forms one bond with two H atoms to form H2O.