Buildings consume about half of the global electrical energy, and an accurate prediction of their electricity consumption is crucial for building microgrids' efficient and reliable functioning, leading to profitability for users and utilities. This paper proposes a novel optimal hybrid strategy for building load prediction that combines bilateral long short-term memory (BiLSTM), convolution neural networks (CNN), and grey wolf optimization (GWO). The GWO obtains the optimal set of parameters of the CNN and BiLSTM algorithms. One-dimensional CNN is applied to extract the time series data feature effectively. The proposed strategy performance is investigated using four buildings having distinct characteristics with hourly resolution data. Results justify that the same technique can be applied effectively to different structures. The work compares and examines their performance with other cutting-edge technologies for the forecast for one day, two days, and a week. The findings demonstrate that the suggested GWO–CNN–BiLSTM technique performs more accurately than standard CNN-LSTM, CNN-BiLSTM, optimized BiLSTM, and traditional LSTM and BiLSTM techniques.