The employment of geostructures as structural supports and as heat exchangers represent an effective, renewable and sustainable way to satisfy thermal needs of the built environment. The structural support of conventional geotechnical structures is coupled with the heat exchanger role by inserting heat exchangers attached to the reinforcing cage of concrete geostructures. Hence, geostructures act as multi-functional elements, called energy geostructures. The concurrent dual role involves thermal and mechanical aspects to be considered during analysis and design, causing novel challenges for engineers. This doctoral thesis focuses on the thermomechanical behavior of underground energy infrastructures (e.g., vertical retaining walls, diaphragm walls, cut-and-cover tunnels, base slabs, multi-floored underground basements, etc...). Prior to this work, limited knowledge on this topic was available and the main challenges were: (i) to thoroughly understand the thermal and hydrothermal aspects linked to the heat transfer within and around the energy geostructure; (ii) to detect fundamental aspects on the thermomechanical behavior; (iii) to provide feedback from real installations. To address such challenges, this doctoral thesis employed experimental, numerical and analytical techniques. Firstly, fundamental aspects on thermomechanical behavior and on hydrothermal aspects linked to the thermal performance are presented. Secondly, aspects related to the early-stage thermal performance design are tackled, presenting a methodology for thermal performance design based on a flowchart. Thirdly, the only analytical model able of considering combinations of axial and flexural thermal and mechanical loads is presented and used to tackle several examples in the field of energy geostructures. Finally, an experimental, in-situ, campaign on an energy wall of an underground energy infrastructure in Geneva (CH) is presented focusing on: the execution of (i) a thermal response test (TRT) and (ii) heating/cooling tests, including aspects linked to test execution, thermomechanical monitoring, data interpretation, and (iii) the determination of the thermal potential of the entire underground energy infrastructure installation. The main results provided by this thesis are: (a) thermal behavior of underground energy infrastructures involves strong interactions with the surrounding environments (e.g., air interfaces); (b) the temperature variation distributions induced by thermal operations are nonuniform, inducing axial and flexural mechanical actions; (c) a modified TRT execution procedure is proposed, allowing for the consideration of non-negligible hydrothermal aspects occurring within the energy geostructure and its surroundings; (d) the in-situ testing campaign undertaken at the site in Geneva revealed a very strong thermal storage potential and a slightly lower extraction potential due to the influence of thermal boundary conditions.