The third rotation allegedly leaves the molecule unchanged no matter how much it is rotated, but is it really okay to assume this? A response in mathematics is welcomed, but if you can explain it in words that would be good, too.
Indeed, the role of symmetries in quantum mechanics is a very important one. I short, the presence of symmetry for diatomic molecules reduces the eigenspace to just 2 values out of which one is degenerate. It is discussed in many instances, see for instance the lectures by Susskind.
Here is an intuitive answer: as long as you model the atoms as points, you need to discard the rotation around the molecule's axis. It has virtually no moment of inertia for that axis.
Assume you have the diatomic molecule like this O-------O. At the middle point you locate a Cartesian three-dimensional system. One of the axis is precisely the one of the bond joining the two atoms (O). and the other two are perpendicular to the axis of the bond. Consider possible rotations of the diatomic system around the three different axis. The rotations around the perpendicular ones produce a motion. But it is easily seen that the rotation around the bond does not produce any motion at all. And that is why the diatomic molecule has only two degrees of freedom of rotation. Hope it is clear.
Of course you can also apply a simplicistic approach and count the degrees of freedom. A diatomic molecule has altogether 6 degrees of freedom. Three of them are translations, which leaves three. Of these three one is a vibration. Two are left, which must be rotations. By the way, this works for all molecules. Substract translations and vibrations from the 3N degrees of freedom and you will automatically obtain the correct number of rotational degrees of freedom.
Yet another take on this: what are rotational (resp. vibrational, or electronic) degrees of freedom, in the first place? They arise from the Born-Oppenheimer approximation, in which the nuclei are assumed to move in a potential generated by the fact that electrons adapt instantaneously to the nuclear configuration. So rotational degrees of freedom are defined via rotations of the nuclear configuration. But when only two nuclei are involved, particularly since they are usually assumed to be point particles, there is no rotation around the axis joining the two nuclei.
In diatomic molecules, there is, of course, a vibrational degree of freedom, but this is indeed frozen out, due to quantum mechanics, as pointed out by Gert van der Zwan.
@Avinash Kumar R., Assuming you haven't figured this out yet, your question can be thought of in terms of I = m r^2, where r~0 for the rotation about the atomic bond axis.
Dear Cory Camasta, Three degrees of freedom come from free motion, one from rotational and one from vibrational & E= 5/2 KBT. The remaining rotational degree has a very small moment of inertia as some participants noted previously.
See the following external post for the full explanation regarding the separation of levels mentioned by Prof. Gert Van der Zwan