Why is the distance between earth and sun important?
Since the sun is very hot and bright, of course it is important to be not too close....
If the earth were a little bit closer it would be too hot on earth. The whole earth would be a hot desert. There would be no plants, no animals and no humans.