Answer
The diatomic molecules are stable because they have completely filled octets (duets for hydrogen) for the atoms.
Work Step by Step
As we can see in the Lewis structures of the molecules, they have completely filled octets (duets for hydrogen) for the atoms. So, they are stable.