Final answer:
Covalent bonds form because they provide a more stable arrangement of electrons. Oxygen in water molecules shares electrons with hydrogen atoms to fill its outer energy level and achieve stability. Similarly, nitrogen in ammonia molecules bonds with hydrogen atoms to complete its valence subshell and form an octet.
Step-by-step explanation:
Covalent bonds form because they give atoms a more stable arrangement of electrons. For example, in water molecules (H2O), each oxygen atom has six valence electrons. By sharing two pairs of these electrons with two hydrogen atoms, the oxygen atom achieves a total of eight valence electrons, filling its outer energy level and becoming more stable. Similarly, in ammonia molecules (NH3), a central nitrogen atom is bonded to three hydrogen atoms, allowing the nitrogen atom to complete its valence subshell and form an octet.