The sun has a strong invisible pull over all the bodies revolving around it. This invisible pull also allows life to exist on Earth. Basically, Earth is at a perfect distance from the sun, which makes life possible on Earth. Because if we get nearer to the sun then all the water might turn into steam and in case we are more away from the sun, the water might turn into ice, in both of the scenarios, there would be no life on Earth. So this invisible pull of the sun ensures that Earth stays at this perfect region where it is neither too hot nor too cold.