The potential energy of an electron in a hydrogen atom is negative due to the nature of the attractive force between the electron and the nucleus, which is governed by quantum mechanics. In contrast, the potential energy of an object near Earth is positive because it is defined relative to a reference point at infinity, where gravitational potential energy is set to zero. The negative potential energy in the hydrogen atom indicates that the electron is bound to the nucleus, while the positive potential energy of an object in Earth's gravitational field signifies that it can escape the gravitational pull. The difference arises from the arbitrary choice of reference points in defining potential energy. Understanding these concepts clarifies the contrasting signs of potential energy in different systems.