Chemistry - Effects of atmospheric gases on colour of aurora
Solution 1:
There is good information at Glowing Gases - Aurorae
There are many factors that need to be considered.
Once an atom or molecule is excited, it can lose the energy by collision or by emission of light.
The longer the lifetime of the excited state, the higher the altitude is required to make radiation vs. collision the way energy is lost.
The atomic oxygen transition with green light has a lifetime of about 1 second, while the transition for red light is 110 seconds, so a higher altitude is required for the red transition to become significant.
For molecular nitrogen, radiative lifetime is only $4 \times 10^{-8}$ seconds according to Electronically excited molecular nitrogen and molecular oxygen in the high-latitude upper atmosphere Ann. Geophys., 26, 1159–1169, 2008
Also, human eyes are more sensitive to green light than red light.
Solution 2:
This phenomenon is already explained in this website, but I will paraphrase it.
All images here are from that website.
The atomic oxygen causes the green and the red color, while diatomic nitrogen causes blue and red:
The effect of altitude on the color is not explained.
However, an explanation is found on Wikipedia:
The highest altitudes have fewer particles, hence fewer collisions. In this state, the oxygen emits the lower-energy $630.0 \mathrm{nm}$ (red).
At lower altitudes, there are more collisions, and the nitrogen molecule also helps exciting atomic oxygen, so the higher-energy $557.7 \mathrm{nm}$ emission (green) dominates.
Solution 3:
The anwer lies in understanding forbidden transitions. These are transitions which are "forbidden" by quantum mechanical electric dipole selection rules, have long radiative lifetimes and only occur radiatively if the density falls below some quenching threshold. Above this density the dexcitation takes place collisionally.
So let me advance a plausible explanation. The green northern lights are formed high up ($\geq 100$ km) in the Earth's atmosphere, largely by photons at 557.7 nm emitted from excited oxygen atoms. This is an example of a forbidden transition with a long radiative lifetime (a second or so).
Forbidden lines get "quenched" by collisions if the density is high enough - i.e. the atoms are de-excited by a collision rather than by emitting a "forbidden line" photon. At lower heights in the atmosphere the densities increase and the forbidden emission is quenched, thus we may not expect to see any green light emitted lower down in the atmosphere. This also accounts for the stripes of different colours that are sometime seen, caused by transitions with different radiative lifetimes and different collisional cross-sections that quench at different densities and hence heights.
A quantitative answer to the question would require a detailed model of the atmosphere (since the quenching densities are also temperature dependent), a model for the energy spectrum and flux (as a function of height) of the incident exciting particles as well as the detailed quantum mechanical radiative lifetimes and collisional cross-sections for each of the relevant transitions. I think that the relative abundances of oxygen and nitrogen play a very minor role compared with these factors.