The discovery of thousands of transiting exoplanets over the past decades and the ones that will be detected with TESS and the upcoming generation of high-resolution telescopes together with the imminent launch of JWST, are expected to open an unprecedent era for the characterization of exoplanets atmospheres. Here we use current efforts based on spectroscopic observations taken with the Hubble Space Telescope for a uniformly processed catalogue of planets to identify systematic trends in clouds and hazes as they are potentially important to understand atmospheric composition and temperature structure. Moreover, we investigate the evolution of the atmosphere of observed small close-in planets by looking into the relationships between their radius, insolation, and density, and by tracking the evolution of their envelope due to photoevaporation. Although the presence of an atmosphere (secondary or reminiscent primordial envelope) can be one of the key factors for the habitability of terrestrial planets, other factors can also have a major influence, such as the activity of the host star. Here we determine the role of different atmospheric scenarios for the habitability of terrestrial planets under the environment of a flaring star M dwarf and G-type stars.