Microgrids have emerged as a promising solution for enhancing energy sustainability and resilience in localized energy distribution systems. Efficient energy management and accurate load forecasting are one of the critical aspects for improving the operation of microgrids. Various approaches for energy prediction and load forecasting using statistical models are discussed in the literature. In this work, a novel energy management framework that incorporates machine learning (ML) techniques is presented for an accurate prediction of solar and wind energy generation. The anticipated approach also emphasizes time series-based load forecasting in microgrids with precise estimation of State of Charge (SoC) of battery. A unique feature of the proposed framework is that utilizes historical load data and employs time series analysis coupled with different ML models to forecast the load demand in a commercial microgrids scenario. In this work, Long Short-Term Memory (LSTM) and Linear Regression (LR) models are employed for an experimental analysis to study the proposed framework under three different cases, such as (i) prediction of energy generation, (ii) load demand forecasting and, (iii) prediction of SoC of battery. The results show that the Random Forest (RF) and LSTM models performs well for energy prediction and load forecasting respectively. On the other hand, the Artificial Neural Network (ANN) model exhibited superior accuracy in terms of SoC estimation. Further, in this work, a Graphical User Interface (GUI) is developed for evaluating the efficacy of the proposed energy management framework.