In response to increasing global temperatures and energy demands, optimizing buildings' energy efficiency, particularly in hot climates, is an urgent challenge. While current research often relies on conventional energy estimation methods, there has been a decrease in the efforts dedicated to leveraging AI-based methodologies as technology advances. This implies a dearth of multiparameter examinations in AI-driven extreme case studies. For this reason, this study aimed to enhance the energy performance of residential buildings in the hot climates of Dubai and Riyadh by integrating Building Information Modeling (BIM) and Machine Learning (ML). Detailed BIM models of a typical residential villa in these regions were created using Revit, incorporating conventional, modern, and green building envelopes (BEs). These models served as the basis for energy simulations conducted with Green Building Studio (GBS) and Insight, focusing on crucial building features such as floor area, external and internal walls, windows, flooring, roofing, building orientation, infiltration, daylighting, and more. To predict Energy Use Intensity (EUI), four ML algorithms, namely, Gradient Boosting Machine (GBM), Random Forest (RF), Support Vector Machine (SVM), and Lasso Regression (LR), were employed. GBM consistently outperformed the others, demonstrating superior prediction accuracy with an R2 of 0.989. This indicates that the model explains 99% of the variance in EUI, highlighting its effectiveness in capturing the relationships between building features and energy consumption. Feature importance analysis (FIA) revealed that roofs (29% in Dubai scenarios (DS) and 40% in Riyadh scenarios (RS)), external walls (19% in DS and 29% in RS), and windows (15% in DS and 9% in RS) have the most impact on energy consumption. Additionally, the study explored the potential for energy optimization, such as cavity green walls and green roofs in RS and double brick walls with VIP insulation and green roofs in DS. The findings of the paper should be interpreted in light of certain limitations but they underscore the effectiveness of combining BIM and ML for sustainable building design, offering actionable insights for enhancing energy efficiency in hot climates. [ABSTRACT FROM AUTHOR]