In the first few million years of the Earth's existence, there wasn't much oxygen in the atmosphere. In fact, the Earth's atmosphere way back then was far from what we currently have today. The dense atmosphere of the young Earth most probably consisted of hydrogen gas, water vapor, methane, and carbon dioxide. The key feature is that there wasn't oxygen in the atmosphere, and so life in land - e.g. animals and humans - who need oxygen to survive cannot be accomodated by the young Earth.
However, the early aquatic organisms - blue-green algae - didn't need this oxygen to survive. Instead, they used the sun's energy to split water and carbon dioxide and form organic stuff - this is photosynthesis as we know it today. As you probably know, oxygen is a by-product of photosynthesis. This by-product, oxygen, soon accumulated in the atmosphere. This is the start of the formation of the atmosphere we currently have.
Oxygen in the atmosphere (`O_2` ) is split into oxygen atoms (O) by absorbing the sun's energy (UV). The oxygen atom then combines with other oxygen gas molecules to form `O_3`, ozone.
The increase in amount of oxygen in the atmosphere, as well as the protection the layer of ozone in the atmosphere provides (protection from the destructive and harmful UV rays from the sun) allowed evolution of life, and the emergence of life on land. [Of course, followed by further evolution over millions and millions of years.]