Water may be produced from atmospheric humidity anywhere on Earth; however, current approaches are energy-intensive and costly, thus limiting the deployment of atmospheric water harvesting (AWH) technologies. A system-level thermodynamic model of several AWH pathways is presented to elucidate the important energy flows in these processes as a means of reducing the energy required to produce a unit of water. Model results show that freshwater may be produced from humid air via processes driven solely with solar electricity in an arid climate with an energy input between 116 kWhe/m3 and 1021 kWhe/m3, depending on atmospheric conditions and processing configuration. We describe a novel, desiccant-based AWH approach in which the latent heat of vaporization is internally recovered resulting in a significant reduction in energy requirements relative to the state of the art. Finally, a parametric model of a desiccant-based AWH system is used to estimate the minimum levelized cost of water (LCOW) via solar-driven AWH at 6.5 $/m3 when both latent and sensible energy are recovered internally.