Jacob V. answered 01/06/22
Physics & Math Tutor
I like the previous answer and agree! For any force dependent on distance, the force will be equal for every point equally distant from the origin point of the force. Every point on the surface of a sphere is equally distant from the center. Hence equality in forces and potential energies.
However I would note that the physical forces that shape the objects mentioned are different.
For planets, the sun, black holes, etc, the force in question is gravity. For atomic nuclei, the same for Strong force. For subatomic particles like electrons, its probably Weak force, although I may be wrong.