Heliophysics is a fast-developing scientific discipline that integrates studies of the Sun's variability, the surrounding heliosphere, and the environment and climate of planets. This volume, the fourth in the Heliophysics collection, explores what makes the conditions on Earth 'just right' to sustain life, by comparing Earth to other solar system planets, by comparing solar magnetic activity to that of other stars, and by looking at the properties of evolving exoplanet systems. By taking an interdisciplinary approach and using comparative heliophysics, the authors illustrate how we can learn about our local cosmos by looking beyond it, and in doing so, also enable the converse. Supplementary online resources are provided, including lecture presentations, problem sets and exercise labs, making this ideal as a textbook for advanced undergraduate- and graduate-level courses, as well as a foundational reference for researchers in the many subdisciplines of helio- and astrophysics.