Why all this diversity? The presence of hydrogen and hydrogen-rich
molecules in the atmospheres of the outer planets is easy to
rationalize. Most of the universe is hydrogen; the only reason hydrogen
(and helium) are rare in the inner solar system is that these light gases
were blown away in the early stages of the solar system via radiation
pressure and the solar wind. Planets like Jupiter kept their hydrogen,
and, since the hydrogen atom likes to combine with other atoms, you get
things like methane (carbon with 4 hydrogens), and ammmonia (nitrogen with
3 hydrogens). Note that Jupiter is very much like the Sun in many
respects. Of course, the Sun is more massive, so it has been able to
fuse hydrogen in its core. Consequently, its surface is hotter, and
most of its molecules have been torn apart by the heat.
One interesting feature of the atmosphere of Jupiter is its turbulence.
Because Jupiter is rotating so rapidly, the gas around the material
moves at extremely high speed. This causes wind patterns that are
somewhat similar to the trade winds on earth, only much stronger;
there is a band of rapidly moving air near the equator, followed by a calmer
region, followed by another region of rapid atmospheric circulation, followed
by another calm region near the planet's poles. In addition to these
overall patterns, there are great storm systems on Jupiter (such as the Red
Spot) that exist of for hundreds of years. (Galileo saw the Red Spot back in
the 1600's.) Although the precise nature (and reason) for the longevity
of the storms is not well known, at some level, such features are easy
to understand. The cloud-tops of Jupiter are rather cold, since the
planet is far from the Sun. On the other hand, the mass of Jupiter is
large, so the inside of the planet is under great pressure. High pressure
means high temperature, so down deep the in atmosphere, Jupiter is
very hot. Just like on earth, when warm air hits cold air, you get
storms.
Now let's contrast Titan with the planet Mercury. Both are roughly the same mass, but while Titan has an atmosphere, Mercury doesn't. Why? The answer lies in the planet's temperature. Mercury is close to the Sun, and is extremely hot. This high temperature means that the molecules and atoms in the planet's atmosphere are moving extremely rapidly. Occasionally, one of these atoms will reach a velocity such that Mercury's limited gravity will not be able to hold it. The atom will then be lost into space. The temperature on Titan, of course, is much lower, so the motions of the molecules are much less. Escape velocity is rarely attained, hence Titan can hold onto its atmosphere. For this same reason, Mars doesn't have much of an atmosphere -- its mass, though larger than Mercury's, is still rather low.
This same mechanism explains why there are no light gases (such as hydrogen) in the atmospheres of the Earth, Venus, Mars, and Titan. At a given temperature, heavy molecules move more slowly than light molecules. (Both have the same amount of energy, but just as a slowly-moving bowling ball carries the same amount of energy than a fast moving misquito, slowly moving heavy molecules carry the same energy as fast moving light molecules.) Now recall that the hydrogen molecule is made up of two hydrogen atoms, each of which has one proton. (Protons and neutrons weigh about 2000 times more than electrons, so we can ignore the electrons.) So the weight of a hydrogen molecule is 2. Helium (which doesn't form any molecules) has two protons and two neutrons, so its weight is 4. Methane is made up of one carbon (6 protons and 6 neutrons) and 4 hydrogens, so its weight is 16. Ammonia is nitrogen (7 protons plus 7 neutrons) with 3 hydrogens, so its weight is 17. Nitrogen gas is made up of two nitrogen atoms bonded together: its weight is 28. Similarly, oxygen gas has two oxygen atoms (each with 8 protons and 8 neutrons), so its weight is 32. Finally, carbon-dioxide is formed from 1 carbon (weight 12) and two oxygens (16 each), so its total weight is 44.
Molecules such as hydrogen and helium are extremely light, so they move
very rapidly. Consequently, they often reach velocities that are too fast
for the weak gravity of the terrestrial planets. These molecules escape into
space. Hydrogenic molecules such as methane and ammonia are heavier, so
their velocities are significantly less. These are trapped by the
gravitational pull of Titan and the inner planets. That's why Titan has
a methane and ammonia atmosphere.
Nitrogen and carbon-dioxide atmospheres are common in the inner part of the solar system. The reason for this is that ultraviolet photons from the Sun cause methane and ammonia to dissociate; when this happens, the results are nitrogen gas, carbon-dioxide, and hydrogen. The hydrogen is light, so it escapes into space, but the nitrogen and carbon-dioxide can be retained. Mars has only enough gravity to retain a little bit of carbon dioxide, while Venus can retain virtually all of its CO_2. Note that Mars is cold enough so that carbon-dioxide can freeze into solid form. (This is called ``dry ice.'') The Martian ice-caps are mostly dry ice with some water ice mixed in (most likely trapped below the dry ice). Since Mars' axis is tipped 23 degrees from the ecliptic plane (like the earth), Mars undergoes seasons, and each ``summer'', some of this ice (dry and water) evaporates into the atmosphere. Thus, parts of the Martian atmosphere are continually freezing out, and boiling in. This is what drives the Martian winds.
An intruiging mystery is why the Earth has a nitrogen-oxygen atmosphere, while Venus has a thick carbon-dioxide atmosphere. The answer is related to Venus' surface conditions, which are extremely hot --- Venus is, in fact, the hottest location in the Solar System. This difference is striking, especially when one considers that both planets have roughly the same mass, were formed roughly out of the same material, and are roughly the same distance from the Sun.
In fact, the atmospheres of Venus and Earth evolved along very different paths because of a slight difference in the beginning. Venus started out slightly closer to the Sun than the Earth. As a result, Venus' surface temperature started out a bit higher. This made the difference.
There are two interesting properties to carbon-dioxide. The first is that carbon-dioxide readily dissolves in liquid water. When you mix CO_2 with water (H_2O), the initial result is carbonic acid, (H_2CO_3). Carbonic acid then reacts with minerals to form rocks. For instance, when carbonic acid encounters calcium, it eats through it to form caclium-carbonate, CaCO_4 (otherwise known as limestone); when carbonic acid hits silicon, it forms silicon-dioxide (sand, quartz, etc.) So the net result is that, as long as there is water, carbon-dioxide can be taken out of the air, and deposited into rocks.
The second important property of carbon-dioxide is that it is a gas that is transparent to optical light, but opaque (i.e., it absorbs) infrared light. (That's one of the reasons that infrared telescopes are on top of high mountains, in airplanes, or even in space.) Carbon-dioxide acts like the glass sides of a greenhouse -- it allows the energy of optical light in, but none of the heat to get out.
Now, consider the early history of Venus. Since Venus was a bit closer
to the Sun than the Earth, it started out with a slightly
higher temperature; this caused most of the water to be in
gaseous form (water vapor) rather than liquid. As the planet evolved,
methane and ammonia were outgassed, and then dissociated by the Sun's UV
light into carbon-dioxide. However, unlike the earth, there was
little water around to dissolve the CO_2. Thus, the
carbon-dioxide remained in the atmosphere to trap the
Sun's heat. This, of course, warmed the planet even more, and
evaporated whatever liquid water there was lying around. The greenhouse
effect was increased, and, as more and more methane and
ammonia were outgassed, the effects got even worse. In other
words, a runaway greenhouse effect was the result.
In contrast, the Earth's liquid water enabled most of carbon-dioxide to condense out of the air and into rocks. With the carbon-dioxide gone, and the hydrogen and helium molecules lost to space, the remaining atmosphere on earth consisted mostly of nitrogen and some methane and ammonia. Eventually, however, photosynthetic plant life developed. These green plants worked to further remove carbon-dioxide from the air, and replace it with oxygen. Over the years, the precentage of oxygen in the air has gradually increased due to plants (it was only 5 to 10% in the days of the dinosaurs), while carbon-dioxide has decreased. (Without the plants, oxygen would disappear, as it would quickly react with the soil and get tied up in solids.)
Along with normal oxygen gas (which consists of 2 atoms of oxygen), some molecules consisting of 3 atoms of oxygen (ozone) are also formed. Ozone is unstable and quickly reacts with other molecules, but, what does exist in the air does a very good job at absorbing ultraviolet photons. Without ozone, this high energy light would penetrate alot further into the earth's atmosphere and destroy animal (and plant) cells.