Answer:
Gravity keeps moons in orbit around their planets and keeps planets in orbit around the Sun. Without gravity, the Earth would not stay a proper distance from the Sun to get necessary light and heat.
Gravity is the reason for the shape of planets and stars. As the mass of a space object increases, it's gravitational pull increases, forming a sphere. Gravity also accounts for planets orbit's.