Theory of the birefringence of the refractive index in atomic diamagnetic dilute gases in the presence of static electric (Kerr effect) and magnetic (Cotton–Mouton effect) fields is formulated. Quantum-statistical expressions for the second Kerr and Cotton–Mouton virial coefficients, valid both in the low- and in the high-temperature regimes, are derived. It is shown that both virial coefficients can rigorously be related to the difference of the fourth derivatives of the thermodynamic (pressure) virial coefficient with respect to the strength of the non-resonant optical fields with parallel and perpendicular polarisations and with respect to the external static (electric or magnetic) field. Semiclassical expansions of the Kerr and Cotton–Mouton coefficients are also considered, and quantum corrections up to and including the second order are derived. Calculations of the second Kerr and Cotton–Mouton virial coefficients of the 4He gas at various temperatures are reported. The role of the quantum-mechanical effects and the convergence properties of the semiclassical expansions are discussed. Theoretical results are compared with the available experimental data.