Oxygen has Z = 8 protons. Neutral O has 8 electrons: 1s² 2s² 2p⁴, i.e. shells K (2) and L (6). The L shell is two electrons short of closed, so oxygen binds strongly to other atoms. Slater's rules give the effective nuclear charge felt by an electron, Zeff = Z - S, with S = 0.35 per other electron in the same shell group, 0.85 per 1s electron for an n = 2 electron, and 0.30 for the other 1s electron. The Bohr-like radius scales as n²/Zeff, so removing electrons shrinks the shells.
The total Slater energy of a configuration is E = -13.606 eV × Σ (Zeff/n)² and an ionization energy is the energy difference between two configurations. This is a rough model: it works within a few tens of percent for the outer shell and is exact for hydrogen-like O⁸⁺, where IE = 13.606 × 64 eV. Measured values (NIST): 13.618, 35.121, 54.936, 77.414, 113.899, 138.12, 739.29, 871.41 eV.
The aurora lines come from forbidden transitions between low-lying levels of neutral oxygen: 1D to 3P (red, 630.0 nm, metastable for about 110 s), 1S to 1D (green, 557.7 nm, about 0.7 s) and the allowed 3p 5P to 3s 5S infrared line at 777.4 nm. The photon wavelength follows from λ = hc / ΔE = 1239.84 eV nm / ΔE. Simplifications: circular Bohr-style orbits are only a drawing aid; real electrons occupy orbitals.