Digitalization and decentralization of energy supply have introduced several challenges to emerging power grids known as smart grids. One of the significant challenges, on the demand side, is preserving the stability of the power systems due to locally distributed energy sources such as micro-power generation and storage units among energy prosumers at the household and community levels. In this context, energy prosumers are defined as energy consumers who also generate, store and trade energy. Accurate predictions of energy supply and electric demand of prosuemrs can address the stability issues at local levels. This study aims to develop appropriate forecasting frameworks for such environments to preserve power stability. Building on existing work on energy forecasting at low-aggregated levels, it asks: What factors influence most on consumption and generation patterns of residential customers as energy prosumers. It also investigates how the accuracy of forecasting models at the household and community levels can be improved. Based on a review of the literature on energy forecasting and per- forming empirical study on real datasets, the forecasting frameworks were developed focusing on short-term prediction horizons. These frameworks are built upon predictive analytics including data col- lection, data analysis, data preprocessing, and predictive machine learning algorithms based on statistical learning, artificial neural networks and deep learning. Analysis of experimental results demonstrated that load observa- tions from previous hours (lagged loads) along with air temperature and time variables highly affects the households’ consumption and generation behaviour. The results also indicate that the prediction accuracy of adopted machine learning techniques can be improved by feeding them with highly influential variables and appliance-level data as well as by combining multiple learning algorithms ranging from conventional to deep neural networks. Further research is needed to investigate online approaches that could strengthen the effectiveness of forecasting in time-sensitive energy environments.