Modern society became vulnerable to a new type of extreme weather around the 19th century. It would later be coined space weather. This weather, observed as severe disturbances of the upper atmosphere and near-Earth space environment is driven by the Sun's magnetic activity. Not only does space weather affect Earth, but all planets in the Solar System are impacted by it. In essence, any planet in the Universe will have its own local space weather. The discovery of exoplanets has intensified interest in searching for habitable planets outside the Solar System and characterizing their local space weather. For this purpose, knowledge acquired about space weather at Earth and its neighboring planets is useful when studying space weather in other stellar systems. The talk will begin with an introduction to physical phenomena (e.g., flares, coronal mass ejections, energetic particles, galactic cosmic rays) that contribute to planetary space weather conditions. In the second part of the talk it will be discussed how extreme stellar activity could possibly influence the characteristics of exoplanets located in the 'Goldilocks Zone' in regard to their potential for habitability, as well as for life evolving on them. Specifically, examples of stellar superflares will be presented, posing the question: Can superflares also occur on our Sun and if yes, what would the consequences be if one did occur?