The force on a planet is given by Newton’s universal law of gravitation (
The force on an electron circling the nucleus is given by
They are similar, both varying inversely with distance squared, but not identical - it is mass that causes gravitational attraction, and charge that causes electrostatic attraction.