The growth of luminous structures and the building blocks of life in the Universe began as primordial gas was processed in stars and mixed at galactic scales. The mechanisms responsible for this development are not well understood and have changed over the intervening 13 billion years. To follow the evolution of matter over cosmic time, it is necessary to study the strongest (resonance) transitions of the most abundant species in the Universe. Most of them are in the ultraviolet (UV; 950A-3000A) spectral range that is unobservable from the ground. A versatile space observatory with UV sensitivity a factor of 50-100 greater than existing facilities will revolutionize our understanding of the Universe. Habitable planets grow in protostellar discs under ultraviolet irradiation, a by-product of the star-disk interaction that drives the physical and chemical evolution of discs and young planetary systems. The electronic transitions of the most abundant molecules are pumped by the UV field, providing unique diagnostics of the planet-forming environment that cannot be accessed from the ground. Earths atmosphere is in constant interaction with the interplanetary medium and the solar UV radiation field. A 50-100 times improvement in sensitivity would enable the observation of the key atmospheric ingredients of Earth-like exoplanets (carbon, oxygen, ozone), provide crucial input for models of biologically active worlds outside the solar system, and provide the phenomenological baseline to understand the Earth atmosphere in context. In this white paper, we outline the key science that such a facility would make possible and outline the instrumentation to be implemented.