More than half of the world population live in urban settlements which are responsible for a large share of energy consumption and, consequently, carbon emissions. The transition towards a more sustainable urban environment requires a change in paradigm in terms of how we design and manage our cities. Urban areas require innovative technologies and strategies to reduce energy consumption and carbon emissions, and to be included in comprehensive plans encompassing all technical, social and economic dimensions which characterise cities. This involves the transformation of urban contexts, with a focus on local and urban-level mitigation measures, such as the construction of positive energy buildings, deployment of renewable energy, promotion of a sustainable mobility, creation of resilient urban infrastructure, implementation of circular economy and recycling practices, etc. The present article provides a perspective on the sustainable energy transition in cities, focusing on the building and transportation sectors. Furthermore, insights on supporting mechanisms and innovative management strategies are presented.