Building energy consumption prediction has become an important research problem within the context of sustainable homes and smart cities. Data-driven approaches have been regarded as the most suitable for integration into smart houses. With the wide deployment of IoT sensors, the data generated from these sensors can be used for modeling and forecasting energy consumption patterns. Existing studies lag in prediction accuracy and various attributes of buildings are not very well studied. This study follows a data-driven approach in this regard. The novelty of the paper lies in the fact that an ensemble model is proposed, which provides higher performance regarding cooling and heating load prediction. Moreover, the influence of different features on heating and cooling load is investigated. Experiments are performed by considering different features such as glazing area, orientation, height, relative compactness, roof area, surface area, and wall area. Results indicate that relative compactness, surface area, and wall area play a significant role in selecting the appropriate cooling and heating load for a building. The proposed model achieves 0.999 for heating load prediction and 0.997 for cooling load prediction, which is superior to existing state-of-the-art models. The precise prediction of heating and cooling load, can help engineers design energy-efficient buildings, especially in the context of future smart homes.