This study presents a comprehensive systematic literature review on building energy flexibility (BEF), a key enabler of demand-side energy management and resilient urban energy systems. Employing the PRISMA methodology, 787 papers published between 2019 and 2024 were initially screened, resulting in a final set of 191 studies included for detailed analysis. The review synthesizes critical insights and proposes a structured research agenda to bridge the gap between theoretical models and real-world deployment, offering strategic guidance to policymakers, energy system designers, and urban planners to develop flexible, sustainable energy systems and buildings.