It is indisputable that power systems are being transformed around the world to increase the use of RES and reduce the use of fossil fuels in overall electricity production. This year, the EU Parliament adopted the Fit for 55 package, which should significantly reduce the use of fossil fuels in the energy balance of EU countries while increasing the use of RES. At the end of 2022, the total number of prosumer installations in Poland amounted to about one million two hundred thousand. Such a high saturation of prosumer micro-installations in the power system causes many threats resulting from their operation. These threats result, among others, from the fact that photovoltaics are classified as unstable sources and the expected production of electricity from such installations is primarily associated with highly variable weather conditions and is only dependent on people to a minor extent. Currently, there is a rapid development of topics related to forecasting the volume of energy production from unstable sources such as wind and photovoltaic power plants. This issue is being actively developed by research units around the world. Scientists use a whole range of tools and models related to forecasting techniques, from physical models to artificial intelligence. According to our findings, the use of machine learning models has the greatest chance of obtaining positive prognostic effects for small, widely distributed prosumer installations. The present paper presents the research results of two energy balance prediction algorithms based on machine learning models. For forecasting, we proposed two regression models, i.e., regularized LASSO regression and random forests. The work analyzed scenarios taking into account both endogenous and exogenous variables as well as direct multi-step forecasting and recursive multi-step forecasting. The training was carried out on real data obtained from a prosumer micro-installation. Finally, it was found that the best forecasting results are obtained with the use of a random forest model trained using a recursive multi-step method and an exogenous scenario.