Spectroscopy and radiative transfer of planetary atmospheres