As per economic development and urbanization, there is a touchy impact on energy consumption for commercial building infrastructures. Energy consumption analysis of commercial buildings plays an important role in building energy management because it helps to evaluate the energy efficiency of buildings. Therefore, a sustainable energy consumption approach is highly significant and effective. With advancements in technology, it is feasible to design and deploy an intelligent computational model that can efficiently perform in a limited resources-driven territory. Thus, a computationally optimized data-driven approach that utilizes advanced data analytics with minimum computing resources such as processing speed, memory consumption, and sampling rate can be helpful in sustainably estimating energy consumption. In our work, we applied different data pre-processing techniques to handle huge input data and standardized our model using z-score and min–max normalization techniques. The results show that the random forest regressor model performs optimum results for commercial building energy consumption. Our model training and validation latency is only 0.82 sec and 1.14 sec respectively. Predicted accuracy with data pre-processing followed by data standardization and optimization is 0.9375. Regarding the error rate, the recorded R square value, median absolute error, and mean absolute error were 0.82, 0.22, and 0.29 respectively. Therefore, the proposed computationally optimized data-driven model can be more productive in regulating energy consumption in urban building infrastructures with limited computing resources.