When electrons gain energy they become more excited and move to a higher energy level, which increases the tendency of an atom to form a bond with another atom.
Let me assure you that this statement is incorrect. I’m not fully sure where you extracted it from, but I assume it stems from the way many schools teach hybridisation at the beginning of organic chemistry classes; requiring an $\ce{s\bond{->}p}$ excitation in carbon from $\mathrm{[He]\ 2s^2\,2p^2}$ to $\mathrm{[He]\ 2s^1\,2p^3}$, after which the s- and p-orbitals can form $\mathrm{sp^3}$ hybrid orbitals. This idea is nothing more than a school level simplification used to get around teaching of more complex molecular orbital theory and symmetry.
Nothing prevents you from constructing e.g. a methane molecule without initial hybridisation, i.e. starting from an unhybridised carbon atom and four hydrogen atoms in a tetrahedric arrangement. I refer you to the following scheme posted in a different question and originally taken from Professor Klüfers’ internet scriptum for basic and inorganic chemistry at the university of Munich:
As you can see on the right, carbon enters this scheme in the unhybridised ground state. There is no need to invoke a previous hybridisation before mixing orbitals; rather, it is necessary to determine the symmetry of orbitals and thereafter combine symmetry-equivalent orbitals in a bonding-antibonding fashion. Finally, fill in electrons from bottom to top.
This method will always result in stabilisation of bonding orbitals; the trade-off always being the destabilisation of antibonding orbitals in such a way that the (actual) energy gained is lower than the (virtual) energy lost.
Therefore, assuming a positive bond order, forming a bond typically liberates energy while breaking one will typically require energy. I am not aware of any counterexamples, but the sentence is phrased so that it remains true when the obligatory counterexample is posted as a comment.