Earths Primordial AtmosphereThere are quite a few theories about the origin of the heavy molecules which comprise the Earths atmosphere today. Since all the planets including Earth were still forming during the Suns T-Tauri phase, the strong stellar winds likely blew away the existing atmosphere and in its place was an atmosphere captured from the surrounding nebula and solar wind. This sequence of events could have happened in reverse, namely a captured atmosphere of cosmic abundances was in place as the first atmosphere, one which was subsequently lost when the Sun entered its T-Tauri phase. Other evidence suggests that comets may have deposited some volatile material including water vapor to Earth and the other terrestrial planets. It was too hot for these gases to condense or rain to the ground, so there as yet was no ocean.
In any case, measurements suggest that 99% of the present atmosphere is a replacement for this primordial atmosphere. Scientists have measured the abundance of 20Ne in the atmosphere today. 20Ne is an element which doesn't change. That is, it is to too heavy to escape from Earth, and doesn't react with anything. What is here is what has always been here. If Earth still had its original atmosphere, then the ratio of the nitrogen to 20Ne in the Earth's atmosphere would be the same as that of the Sun, namely "cosmic" ratios. The amount of cosmic nitrogen is about 5 times the amount of cosmic 20Ne yet the ratio of nitrogen to 20Ne in the Earth is 10,000! This means that the Earth's atmosphere is enriched in nitrogen relative to the Sun, and the extra nitrogen must have come from somewhere. Moreover, with small planets like the Earth, Mars and Venus the atmosphere will eventually drift away unless it is replenished somehow. Scientists call the new atmosphere a secondary atmosphere, and they think gases come from terrestrial volcanic activity. This suggests that, with Earth at least, the atmosphere is continually replenished by volcanic activity.