The motion of the planet around the earth is due to the centripetal force. This centripetal force is provided by the gravitational force between the planet and the sun.
This force depends on the mass of the sun and mass of the planet, and on the distance between sun and planet.