Using estimation theory, we study an optimal algorithm for estimating temperature by the rotational Raman spectra of light scattering by molecules of atmospheric nitrogen and oxygen. The simulation technique is used for comparing the optimal estimation algorithm with the parameter fitting procedure and an heuristic algorithm commonly used for calculating temperature by pure rotational spectra.