Recently I moved to the north of Norway, so I've seen quite a few auroras. Because the colour is mainly green, I was sure this must be due to electron transitions in $\ce{N2}$ (because the atmosphere is like $75\%$ $\ce{N2}$) Looking into this, however, I found out that the colours of the aurora are mainly due to electron transitions in oxygen gas. Why is it that the electron transitions of oxygen are most prevalent in the colours of the aurora, even though it is far less abundant than nitrogen?
I also read that oxygen gas gives one colour up to $150$ miles altitude(green), and another above $150$ miles (red). Can someone explain the reason for the difference in colour? Does oxygen exist in different oxidation states at different altitudes, leading to different electron configurations => different available electron transitions?