The worldwide energy transition drive considering the high uptake of renewables comes with the challenges and uncertainties associated with weather dependent distributed energy resources (DERs). Moreover, dealing with the peak demand becomes difficult for these stochastic natured DERs. Solar Photovoltaics (PV), being prominent at the low voltage distribution network has the fluctuating output which, however, can be compensated by the energy storage (ES). This paper presents a week ahead PV power generation and demand side forecasting for a particular region in the United Kingdom (UK) through machine learning (ML) algorithms and optimize the future schedule of ES to manage the peak demand. A Bayesian hyperparameter tuning approach has been adopted here to develop the models for both PV generation and load demand forecasting. The results have been compared with the existing state of the art ML models based on root mean square error (RMSE) values and found that the proposed model has the least error among all. This model is further selected to optimize the ES schedule. The scheduled power mismatch has also been compared with the actual data, the data forecasted with a baseline ML model and the proposed model. ES scheduling with proposed model is 24% more accurate than the existing benchmark models.