Even if the spontaneous creation of life on earth was largely accidental, there must be peculiar features of our planet that make it more comfortable than other ones in the solar system. Important features include:
  • Distance from the Sun.
    The temperature of a planet is determined, to a first approximation, by this. Once Life establishes itself, it can help to regulate the global temperature - but it needs a reasonable baseline to start from. The Earth's spin is also vital, to allow both sides of the planet to warm properly.
  • Large Moon.
    The moon is thought to have protected the early Earth from any meteorites that didn't hit Jupiter. As the dinosaurs discovered, rocks aren't good for Life. Additionally, our satellite is thought to stabilise the spin of the Earth, preventing too much tilting of the axis. Since the Earth has to be evenly heated, this is much more comfortable.
  • Solid Surface.
    Jupiter is mostly gas (with a metallic hydrogen core?) and could hardly provide enough complex rock surfaces for self sustaining chemical reactions to start. Deep space may be full of clouds of alcohol or DNA, but that is a mere resource.
Of course, all this presupposes we are talking about the type of life found here (carbon-based life forms) and not giant intelligent clouds or silicon wired planets. However, one of the vital elements for our sort of life is water (liquid - which requires middling temperatures); as a universal solvent it is without equal.
It may seem a circular question to ask 'how is it that we are here' when we wouldn't be here to ask it if things were different. However, I'm not talking about intelligent life here. Even a tiny few pseudocells clinging to the barren rocks of Mars would count as some form of Life.

If there are two main 'hurdles' Life has to overcome it is 1)Booting up and 2)Not crashing. Of course, Life here might crash at some point - in which case future alien civilisations might look at our barren planet and say 'Why was this planet so inhospitable?'. While there might be many worlds out there that could generate life, there are probably few that can sustain it.

As for stars and grains of sand (see link in other writeup); the number of prokaryotic cells exceeds these values by a factor of 109 - a billion times more bacterial cells than grains of sand.

This is one of those questions where the answer presupposes the question. If this planet hadn't been so hospitable to the development of carbon, oxygen and water reliant life, we wouldn't be here to ask the question in the first place. Hence there are no human beings on Mercury saying "Why is this planet so inhospitable to our kind of lifeform?".

The question it does raise however is just how perilous and unique are the conditions that exist on earth, and could life develop under other circumstances. My own personal view is that there is undoubtedly life elsewhere in our universe: after all, even if the odds of life developing here are a million to one against, or even a billion to one against, the fact that there are more stars in the universe than grains of sand on earth means that single-cellular organisms or even basic protein chains will have developed somewhere; whether any of them ever evolved beyond that point is the real question.

The distance from the Sun alone doesn't account for the climate here on Earth.
Were it not for a natural greenhouse effect, the Earth would still be too cold to maintain life.

Without an active biosphere, all the oxygen would have been lost via oxidization, carbon dioxide levels would have risen uncontrollably without photosynthesis to regulate it and we would have lost our oceans (see Venus).

To a large extent, the prescence of Life itself is what keeps the Earth habitable.

James Lovelock makes a much more convincing argument than I can in his Gaia hypothesis, which views the Earth as a self-regulating system.

(Incidentally, an infinite Universe does not in itself guarantee Life elsewhere.
Just because an infinite can of baked beans contains a button
it does not neccessarily contain an infinite number of them.)

The unique combination of random elements that led to Life on Earth can easily be extended to the Universe as a whole, see The Anthropic Cosmological Principle.

Log in or register to write something here or to contact authors.