From space to ground: planetary atmospheres revealed through a machine learning approach