The number of valence electrons in an atom determines its chemical properties (such as reactivity). If the number of valence electrons is 0, it means that the outer shell of the atom is completely filled and hence it is an atom of a noble gas and hence will be non-reactive. If the number of valence electrons is small, say 1 or 2, then it is likely that the atom will lose them and become a cation. Such atoms (After becoming cations) participate in ionic bonds. If the number of valence electrons is close to 8, then atom will gain electrons and become an anion and participate in ionic bonds. In other scenarios, the atom will neither gain nor lose electrons, rather it will share them with other similar atoms and hence participate in covalent bond.
Hope this helps.