Water is formed from two of the three most abundant elements in the universe and so is abundant in interstellar space, in our Solar System, and on Earth, where it is an essential compound for the existence of life as we know it. Water ice acts as a substrate and reactant in interstellar clouds of gas and dust, enabling the formation of organic compounds that are important precursors to life and that eventually became incorporated into comets and asteroids in the early Solar System. Laboratory experiments have allowed us to infer the reaction pathways and mechanisms by which some of these compounds are formed. In these reactions, water can act as an energy transfer medium, increasing product yields, or it can lower yields by diluting reaction centers. Water can also destroy organic compounds when water ice decomposes under ionizing radiation and the decomposition products attack the compounds; whether this happens depends critically on temperature and structure of the ice, whether crystalline or amorphous. Ice structure and temperature also largely determine its gas content. As the solar nebula collapsed, icy mantles on interstellar grains probably sublimated and then recondensed onto other grains, thus influencing the transport of energy, mass, and angular momentum in the disk. Icy grains also influenced the temperature structure of the disk because they influence mean disk opacity. Outside the “snow line” at 3–5 AU icy grains accreted to become part of comets and planetesimals that occupy the region of the outer planets, the Kuiper belt, and the Oort cloud. Water was acquired by the growing Earth by several mechanisms. Evidence from noble gas isotopes indicates that Earth achieved sufficient mass fast enough to capture an early H-rich atmosphere from the Solar nebula itself. Although the remnant of this primary atmosphere is now found only in the mantle, it may also reside in the core, which could contain most of the H on Earth (or none at all). The bulk silicate Earth contains only 500–1100 ppm H2O, an amount small enough to explain by “wet” accretion, although most of it probably accumulated with the latter half of Earth's mass from wetter planetary embryos originating beyond 1.5 AU. Degassing on impact delivered water to Earth's surface, where it dissolved into a magma ocean, a process that likely saved it from loss during subsequent catastrophic impacts such as the Moon-forming giant impact, which resulted in >99% loss of the noble gas inventory. Although most of Earth's water probably came from meteoritic material, the depletion on Earth of Xe relative to Kr strongly suggests a role for comets. The role of water in supporting life is an essential one on Earth and probably elsewhere, given the unusual properties of water compared with other potentially abundant compounds. Its dipolarity, high boiling point and heat of vaporization and, for ice, melting temperature; its expansion on freezing; and its solvent properties make it an ideal medium for life. Life originated early on Earth, indicating an abundance of water, nutrients, precursor molecules, substrates, and appropriate physical and chemical conditions. Life adapted quickly to (and may have originated in) extreme environments, of heat, cold, dryness, saltiness, and acidity. This adaptation to extreme conditions bodes well for the prospect of finding life elsewhere in our Solar System and in planetary systems around other stars.