Chemical bonding occurs when atoms interact and share or transfer electrons to achieve a stable electron configuration. Atoms are least likely to react when their valence shell is filled with electrons. Atoms can achieve a stable configuration by gaining or losing electrons through reactions with other atoms to fill their valence shell.