Abstract: This Ph.D. thesis comprises two main parts: the estimation of energy and water demands for residential buildings and the development of innovative solar-based polygeneration systems for small buildings. A systemic methodology was employed to address this challenge, beginning with an analysis of the building's energy behavior, followed by the design of an appropriate polygeneration facility, and finally, optimizing its energy efficiency, economic feasibility, and environmental impact for the specific building. The case study consisted of a set of representative buildings, combining different building types, energy codes, and climate zones within Spain. A generic pattern for electricity, heating, cooling, domestic hot water, and freshwater consumption was determined through simulations using multiple tools to generate these demands. Consequently, all demand profiles were displayed with an hourly resolution over a year. Furthermore, thermal comfort analysis was performed to validate thermal requirements. The design of a residential polygeneration system is based on novel configurations, as it includes several technologies that have been minimally explored in the existing literature and are not typically integrated into polygeneration schemes. These systems manage the production of thermal and electrical energy to satisfy the five demands of a residential building while considering the capacities of thermal and electrical storage. In particular, the leading technologies used in the systems include photovoltaic/thermal collectors, reverse osmosis, lead-acid battery, thermoelectric generators, and desiccant air conditioning. The polygeneration plant supplies electricity, space heating and cooling, domestic hot water, and freshwater for residential applications. Photovoltaic/thermal collectors, used for both electricity and heating production, were incorporated into all system layouts. In the first work, the developed plant was grid-connected, consisting of a reverse osmosis device and a desiccant air conditioning system to address freshwater and cooling demands, respectively. The second investigation evaluated the prior configuration as an off-grid facility by incorporating lead-acid battery storage for electricity backup. The third system examined the previous on-grid polygeneration plant with added photovoltaic panels and a biomass boiler, offering flexibility for optimizing the usage of photovoltaic/thermal collectors. Lastly, thermoelectric generators were integrated into the previous design, along with a heat pump and a single-effect absorption chiller for space cooling, and a multi-effect distillation unit for water desalination. The first three systems were applied to a single-family townhouse, while the final configuration was implemented in a medium/large apartment block. Consequently, as the polygeneration system size increased, it became necessary to explore new technologies appropriate for higher energy demands, such as single-effect absorption chillers and multi-effect distillation units. Due to the potential for integrating various technologies to match the building's demands and energy services, the TRaNsient System Simulation (TRNSYS) software was primarily employed for designing and dynamically simulating the building and polygeneration systems. Furthermore, a sensitivity analysis was carried out to investigate the systems¿ best setup. Additional design optimization was performed to ensure optimal energy efficiency, environmental impact, and economic profitability for the proposed layouts. Overall, this thesis provided useful insights into the design of sustainable polygeneration systems, using the produced power and heat to match residential users¿ needs, particularly in regions facing water scarcity.