Valence electrons are the electrons in the outermost shell of an atom. These electrons determine whether the atom will participate in chemical bonding or not, and if it does, what type of bonds it will form. If the outermost shell is completely filled with electrons - that is, the atom has achieved noble gas (for example, argon, helium, etc.) configuration - then there would be no valence electrons available for bonding and hence no bonding will take place. On the other hand, if it is the atom of a metal (say, sodium, calcium, etc.) has few valence electrons, it is likely to donate them to become a cation; while at the same time, these valence electrons will be accepted by a non-metallic atom, such as chlorine (which has a large number of valence electrons and needs a few more to achieve noble gas configuration). This type of bond is an ionic bond. In cases where direct exchange of valence electrons will not fill valence shells, electrons are shared in a covalent bond.
Hope this helps.