Rocky planets and life
Our Earth is a special planet, because it has liquid water on its
surface, and we know it hosts life. That
may be a mildly special attribute, or a spectacularly special
attribute, and the only way to know which is look out beyond our
solar system and find the attributes of more "generic" examples of
planetary systems.
In general, we expect that life requires liquid water, and life as we
know it would require liquid water on the surface, because of the
importance of photosynthesis and warming from starlight.
Liquid water on the surface is found on only 1 out of 4 terrestrial planets
in our solar system, and is probably even less likely than 1/4, perhaps
vastly so. Because of the anthropic principle, we will not know the answer
to this until we begin to characterize Earthlike planets around other stars.
The story of air and water
The reason liquid water on the surface is thought to be rare is that it
requires both an intermediate distance to the star (too close gets too
hot and oceans vaporize, too far gets too cold and oceans freeze), and
a fairly thick atmosphere (to provide the necessary pressure for the
liquid phase of water).
Note that liquid water underneath the surface, perhaps under ice like on
Europa and Enceladus, needs neither of those things (heat can come
geothermally, pressure can be due to the weight of ice), so is much
easier to come by, but probably would not support the kinds of life we
are most interested in.
Thus, the story of liquid water on the surface is of greatest interest, and
it involves the story of air.
The air is thought to mostly be outgassed from the mantle.
Strangely, the most common outgassed volatile appears to be the H2O molecule,
but this does not show up in atmospheres unless there is liquid water
on the surface, and that's what we need an atmosphere to allow.
So the atmosphere must come from something else.
The next most common volatile is CO2, but this is not conducive to having
liquid water because thick CO2 atmospheres appear to be prone to runaway
greenhouse effects, such as on Venus.
The modes of oscillation of CO2 (and H2O) allowed by its lack of symmetry
and its three nuclei are conducive to the absorption of IR light coming
from the planet, which raises the temperature under a "blanket" of
greenhouse gases.
So to have a liquid ocean, it may be necessary to get rid of the CO2.
Fortunately, rain and oceans are quite good at getting rid of CO2,
but it takes a long time and may require special conditions to happen
in a stable way.
So if you do want oceans, and you don't want CO2, then the next most common
outgassed volatile is N2, as we find in the Earth's atmosphere.
N2 is not a greenhouse gas, because it does not allow the efficient oscillation
modes that absorb IR (which require a dipole moment).
So if you have enough N2, and your H2O is in oceans and your CO2 has been
locked up into rocks by the action of rain and water (and life finds other
ways to sequester carbon), then you can have a stable configuration with
oceans and a N2 atmosphere, as we find on Earth.
Since we have not found this anywhere else, we do not know how stable it
is-- it might be rather rare or precarious, though on Earth is has been
resilient and stable.
Atmospheric escape
But to have an atmosphere for billions of years, the gravity of the planet
must be able to prevent that atmosphere from escaping.
If the thermal speed of the gas equalled the escape speed, it would escape
essentially immediately, so the thermal speed must be much less than the
escape speed, typically no more than 1/6 of the escape speed.
Then only the tail of the distribution can escape through the region where
there are few collisions between air particles, called the exosphere.
The tail is a very sensitive function of temperature, so the planet must
be far enough from the star.
The thermal speed is proportional to the square root of the
quantity temperature
divided by mass (now would you show that?), so is very sensitive to distance
to the Sun.
At Jupiter distances, a large rocky planet can hold a hydrogen atmosphere
and be a gas giant,
and at our distance, it can hold a nitrogen atmosphere.