The rate coefficients of vibrational excitation of ground-state molecules N-2(X-1 Sigma(+)(g)) and O-2(X-3 Sigma(-)(g)) in processes of the quenching of electronically excited molecules N-2(A(3)Sigma(+)(u), B-3 Pi(g), W-3 Delta(u), B'(3)Sigma(-)(u), a'(1)Sigma(-)(u), a(1)Pi(g), w(1)Delta(u)) and O-2(a(1)Delta(g), b(1)Sigma(+)(g), c(1)Sigma(-)(u), A'(3)Delta(u), A(3)Sigma(+)(u)) are calculated according to quantum-chemical approximations. Applying the calculated rate coefficients we have studied the role of inelastic intermolecular and intramolecular electron energy transfer processes in the production of vibrationally excited molecules at altitudes of the lower thermosphere and mesosphere during auroral electron precipitation. The study of vibrational populations (nu'=2-30) of the X-1 Sigma(+)(g) state of N-2 at the altitudes of the lower thermosphere and mesosphere during auroral electron precipitation has shown three principal excitation mechanisms: radiational transitions from the A(3)Sigma(+)(u) and a(1)Pi(g) states for vibrational levels v' > 10, intramolecular electron energy transfer process in N-2(A(3)Sigma(+)(u),nu=0-5)+N-2 collisions for vibrational levels v'=25-30 and the excitation by auroral electrons. Calculations have shown that transitions from two singlet a(1)Delta(g), b(1)Sigma(+)(g), and three Herzberg c(1)Sigma(-)(u), A'(3)Delta(u), A(3)Sigma(+)(u) electronically excited states of molecular oxygen through radiational and collisional quenching are important in vibrational excitation of ground-state molecule O-2(X-3 Sigma(-)(g),v'=2-37). (C) 2012 Elsevier Ltd. All rights reserved.