The worldwide need for electrical energy is increasing, and integrating renewable energy sources (RES) into the power grid will enhance the efficient use of clean energy to fulfill the growing demand for energy. However, the uncertain nature of power from the RES like solar and wind, utility price, and load demand, necessitates accurate forecasting of the uncertain parameters (UP) to improve the reliability of the hybrid microgrid. In this work, optimal energy management (EM) of a hybrid AC-DC microgrid (HMG) is proposed which comprises of two phases, forecasting and scheduling. In the former phase, the uncertainties like day-ahead utility price, electrical demand, and power from the RES are forecasted using the support vector machine (SVM) algorithm and the results are compared with the artificial neural network (ANN) algorithm. In the second phase, the improved Teaching and Learning-Based Optimization (ITLBO) algorithm isused to reduce the generation costs over a 24-h period in a hybrid microgrid. The forecasted uncertain parameters are used as input in the second phase. Power trading occurs between the utility grid and the hybrid microgrid based on load demand and bidding costs, aiming to minimize generation costs. The proposed framework's viability and performance are assessed using IEEE standard test systems. The generating cost, as well as the optimal power dispatch of the HMG, is obtained using the ITLBO algorithm, and the results are compared with different meta-heuristic techniques such as the teaching and learning-based algorithm (TLBO), Ant Lion Optimization algorithm (ALO) and the artificial bee colony algorithm (ABC). The results obtained demonstrate the superiority of the SVM algorithm in forecasting and the ITLBO algorithm over other methods in minimizing operating costs.