  Over the last twenty years, the search for extrasolar planets revealed us the
rich diversity of the outcomes of the formation and evolution of planetary
systems. In order to fully understand how these extrasolar planets came to be,
however, the orbital and physical data we possess are not enough, and they need
to be complemented with information on the composition of the exoplanets.
Ground-based and space-based observations provided the first data on the
atmospheric composition of a few extrasolar planets, but a larger and more
detailed sample is required before we can fully take advantage of it. The
primary goal of the Exoplanet Characterization Observatory (EChO) is to fill
this gap, expanding the limited data we possess by performing a systematic
survey of hundreds of extrasolar planets. The full exploitation of the data
that EChO and other space-based and ground-based facilities will provide in the
near future, however, requires the knowledge of what are the sources and sinks
of the chemical species and molecules that will be observed. Luckily, the study
of the past history of the Solar System provides several indications on the
effects of processes like migration, late accretion and secular impacts, and on
the time they occur in the life of planetary systems. In this work we will
review what is already known about the factors influencing the composition of
planetary atmospheres, focusing on the case of gaseous giant planets, and what
instead still need to be investigated.
