Their electrons must be the same. Afterall, if the bond is covalent, the electron must be shared equally. This can only happen is the atoms tug on the electrons with the same strength. Since the strength is determined by electronegativity, then the electronegativities must be the same.