In recent times, smart-built environments have gone through an incessant transformation, becoming more independent and sensitive ecosystems which can balance energy consumption and user comfort, whilst also achieving higher order of safety for users. The consumption of a high volume of energy in buildings has resulted in numerous environmental issues which have adverse effects on human survival. The estimation of building energy use becomes necessary to conserve energy and enhance decision-making in reducing energy usage. In addition, constructing energy-efficient buildings will help to reduce the total energy utilized in newly constructed buildings. The machine Learning (ML) technique was regarded as the most suitable method to produce favourable results in forecasting tasks. Therefore, in numerous studies, ML was implemented in the domain of energy utilization in operational buildings. This article introduces an Improved Moth Flame Optimization with Weighted Voting Ensemble Learning (IMFO-WVEL) model for Energy Consumption Forecasting in Residential Buildings. The presented IMFO-WVEL model majorly aims to forecast energy utilization in residential buildings. To accomplish this, the presented IMFO-WVEL model follows the initial stage of data preprocessing to make it compatible with further processing. To forecast the energy consumption in residential buildings, the WVEL technique comprises three DL models namely stacked autoencoder (SAE), deep neural network (DNN), and bidirectional long short-term memory (BiLSTM) is used. Finally, the IMFO algorithm is derived by the integration of MFO with the Levy flight (LF) strategy and is applied for the hyperparameter tuning process. The experimental validation of the IMFO-WVEL technique is performed under distinct aspects. The comparison study exhibited the promising performance of the IMFO-WVEL technique over recent approaches in terms of several performance measures.