Answer is: the lowest potential energy occurs when the two nuclei are an optimum distance apart from one another so that they don't repel each other.
Covalent bond length is the internuclear distance at which the lowest potential energy is achieved. Lower potential energy increases the stability of the system.