According to law of equipartition of energy, a molecule can have12KT energy per degree of freedom.
A diatomic molecule has two rotational degrees of freedom. Hence the total rotational kinetic energy is KT.