How do valence electrons affect bonding?
Valence electrons are those elections that can be exchanged or shared in order to create a chemical bond.
In ionic bonds it is the valence electrons that are lost or gained in order to reach an octet (8 electrons in the outer orbital). These electrons are found in the s and p orbitals of the highest energy level.
A metal will typically lose electrons from their valence shells and become positive ions while non-metals will gain electrons in their valence shells and become negative ions.
In ionic bonds the the atoms are attracted when their charges are equal and opposite coming an electrochemical bond.
In the case of covalent bonds the atoms actually share electrons in their valence shells in order to reach the octet.
Therefore, in most bonds it is the manipulation of the valence electrons that determine the type and effect of bonding.
I hope this was helpful.
Good explanation, very nice colors with additional info here https://dlc.dcccd.edu/biology1-2/chemical-bonding