released into air overtime , oxygen , a waste product of photosynthesis , enriched the upper atmosphere to form the ozone layer , which freed lifeforms from the water and allowed them to colonize the surface of the ocean and eventually land .