Cities occupy 0.5% of the earth surface, but they consume 75% of worldwide energy, and they are responsible of 50% to 80% of CO2 emissions. Cities are directly responsible for the climate change. However, they are the key for providing solutions to this problem. More specifically, a city comprises a very large number of microclimates, according to their urban and environmental design. A sustainable and liveable urban planning could well improve the urban environmental conditions by mitigating the energy fluxes of the city. The objective of this thesis is to address the energy fluxes within the urban environment, in time and space. The study focuses on the improvement of the energy demand of buildings as well as the outdoor human comfort. To do so, we try to establish a new bridge between the biometeorology and the architecture and to find a simplified approach to bring this research into practice. More specifically, the human comfort is well addressed in the research domain but, due to its complexity, it is quite difficult to use it in the real practice. In order to overcome this problem, we introduce three new modules in the software CitySim Pro. CitySim is an urban energy modelling tool which is able to quantify, dynamically, the energy demand from a building scale to the city scale. A first module, developed in this doctoral thesis, focuses on the quantification of the outdoor human comfort by the Index of Thermal Stress (ITS) and the COMFA* budget. The second module aims to understand the radiative environment by the calculation of the Mean Radiant Temperature (MRT). The third module focuses on the cooling potential of the vegetation and evaluates the shadings and the evapotranspiration provided by greenings. Based on the modules, Comfort Maps are designed, representing an important instrument to bring the research into practice: these maps are proposed as an effective way to share information between architects and municipalities, providing indications on the urban microclimatic conditions. Finally, the developed modules are used to optimize, using the hybrid CMA-ES/HDE evolutionary algorithm, the energy demand and the outdoor human comfort of two campuses: EPFL campus in Lausanne (Switzerland), and the Swiss International School (SISD) campus in Dubai (United Arab Emirates). On site monitoring, realized in the SISD campus, underlined the impact of the built environment, as well as the shadowing strategies, by punctual monitoring in five locations of the campus. The results show that i) we should not limit an architectural design to a single building, but it is important to think and design at the district/ city scale. There is ii) a strong relationship between the energy demand of buildings and the outdoor human comfort, consequently both of them should be jointly addressed by architects and urban planners, focusing on the building and the "space between buildings" design. Finally, iii) a sound urban design should derive from the bioclimatology, transforming the climatic adversities into design opportunities. Finally, a list of practical recommendations is defined, providing a support for a sound architectural design in time, and space.