if you want to rotate an object around a point, you can do something like this:
// oSun CREATE EVENT
rotation_speed = 5;
angle = 0;
distance_from_centre = 64;
centre_x = room_width/2;
centre_y = room_height/2;
/// oSun STEP EVENT
var input = (keyboard_check(vk_right) - keyboard_check(vk_left));
angle += (input * rotation_speed);
x = centre_x + lengthdir_x(distance_from_centre, angle);
y = centre_y + lengthdir_y(distance_from_centre, angle);
if you have multiple planets you can have a oPlanetParent object with the code written above.
Then make oSun and oEarth and whatever planet you have inherit from the oPlanetParent object.