Stellar flares can have a significant influence on planetary atmospheres and their radiation environment by enhancing atmospheric escape, altering their chemistry and radiation dose enhancement on their surface. Data from missions such as Kepler, Gaia and TESS have provided us with the flare frequency distribution (FFD) of flares around a variety of stars. We model the impact of enhanced XUV radiation and Stellar Proton Events on potentially habitable planets. We use the energy-limited equation to model how XUV radiation from flares can enhance atmospheric escape in planets in habitable zones around a variety of stars. We make estimates of ozone depletion for planets with Earth-like atmospheres. We also model the impact of Stellar Proton events on terrestrial planets and calculate radiation dose enhancement on their surfaces. We explore the role of planetary magnetic field strength and atmospheric column depth in regulating the radiation dose on the surface. We discuss the implications of our results on the habitability of terrestrial planets in habitable zones around a variety of stars.