Buildings play a pivotal role in the daily functioning of cities, and the development of smart cities is intricately linked to the sustainable development of architectural practices. However, existing reviews have predominantly concentrated on the development of smart cities, often overlooking the interdisciplinary complexities associated with integrating smart city technologies and sustainable building practices. This study systematically reviews 418 relevant papers from the Web of Science database, employing both quantitative and qualitative analytical methods to assess the current status and future trajectory of the field. Therefore, it bridges a significant gap in the existing literature. The findings underscore the contributions of technologies such as the Internet of Things (IoT), artificial intelligence, and big data in enhancing the sustainability of buildings within smart cities. The key areas of focus include energy management, smart building systems, and resource optimisation. Furthermore, the study identifies emerging research themes, such as smart city buildings, smart energy management, and digital twins, highlighting their potential to optimise building performance and foster sustainability within evolving urban systems. The keywords identified in the current body of research are categorised into six main areas: context, objectives, methods, artificial intelligence, emerging technologies, and opportunities and challenges. Research themes are seen to progress from "performance" to "building" and "sustainability" and from "city" to "city" and "sustainability". Notably, themes such as "city", "modelling", and "design" have evolved into themes centred around the "Internet". However, with the rapid expansion of digital technologies, scholars must also address several critical challenges, including data security and privacy protection, the complexity of cross-system data coordination, uncertainties in sustainable optimisation processes, and the ethical and societal implications of technology adoption. To ensure the successful and sustainable development of future urban smart buildings, it is essential to establish rigorous data security standards, harmonise technical protocols, implement effective global strategies, and prioritise ethical considerations. In addition, unmanned technologies and their associated systems offer valuable insights into the sustainability of buildings in smart cities. Finally, this study presents a comprehensive and systematic framework that provides invaluable insights for future strategic planning and technological advancements in the field.