Due to the finite nature and detrimental environmental impacts of conventional fossil-fuel energy resources, renewable energy resources are promising clean and sustainable forms of energy for meeting society’s future energy needs. As renewable energy continues to gain higher penetration in the electric power grid through distributed generation, microgrids represent an innovative approach towards achieving a distributed grid architecture, playing a critical role in implementing future smart grid systems. This dissertation first introduces a novel online prediction algorithm with the forgetting factor: Affine Extreme Learning Machine with Forgetting Learning (FL-AELM). The proposed FL-AELM is applied to forecast solar generation and EV charging power. Due to training data's non-availability and seasonality features, the FL-AELM is actively trained by the new training and outdated data. Compared to other state-of-art prediction models, the proposed FL-AELM increases the prediction accuracy by over 8% and 13% for solar generation and EV charging power, respectively. Additionally, this dissertation introduces the unique EV characteristic from the charging current time series: tail feature. Tail is a subsequence of the charging time series consisting of consistently nonincreasing current in the constant voltage stage. A novel shape-wise distance – refine matrix profile similarity (RMPS) is proposed to measure the global similarity of two tails by comparing each subsequence of the two time series. By tunning the subsequence length and cluster numbers, diverse charging profiles can be classified into seven groups with unique tail templates. Combining the learned tail templates into the centralized and distributed EV smart charging optimization, an average of 4% - 5% flexible rate or 0.7% satisfactory rate improvement can be achieved. This dissertation further introduces two real-world microgrid applications equipped with solar generation and battery energy storage systems (BESS). Different predictive model-based energy management systems for the microgrids are developed and implemented to handle demand response, load shifting, and net load reduction (i.e. peak shaving). With the utilization of BESS, the microgrid systems can reduce the electricity cost reduction and peak demand. It is clear that if the system transitions to the updated time-of-use periods, the energy storage system can significantly contribute to more cost savings and take a more critical role in reducing the total electric bill than the legacy time-of-use periods.