The distance of earth from the sun is 93 million miles. It is the optimum distance to support life. It is called Goldilocks zone. It is the distance from the star where the planet can maintain liquid surface water.

->If earth is 5% closer to sun: there would be no water on the surface. It will be a blistering desert.
->If earth 10% further: earth would be a freezing planet. It would turn into an icy waste land.

No life can sustain in those above condition. So we are very lucky to have Earth where it is.

Earth closer to sun makes it a blisterring desert

Earth little closer to sun: makes it a blisterring desert which is unsuitable for lifeform to develop.

Our beautiful earth where liquid water exist.

Beautiful Earth where liquid water helps to create lifeform.

atom

Earth little further from sun : makes it a freezer which is also unfavourable for life to sustain.