Quantum-chemical calculation of spectroscopic parameters for rotational spectroscopy: Application to astrophysics and atmospherical systems