This paper analyzes energy supply scenarios for a grid-connected hybrid system consisting of photovoltaic panels, an energy storage system, and a diesel generator. Scenarios are defined by varying the contributions of solar and diesel power, while the energy storage system manages excess energy for later use. A Time-of-Use demand response strategy is integrated to optimize energy consumption. The analysis examines the effects of increasing solar energy shares and applying demand response on costs and carbon dioxide emissions. Results show that higher solar shares reduce diesel dependence, leading to increased costs but significantly lower carbon dioxide emissions. For example, in a scenario where 50 percent of the energy demand was met by solar power, costs increased by 80.10 %, while carbon dioxide emissions decreased by 45.49 % compared to a scenario without solar panels. Applying demand response across all scenarios reduced the required panel installation area by 3.72 %. Initially, demand response led to higher costs and carbon dioxide emissions as the solar share increased, but ultimately resulted in reductions in both metrics. This study highlights the trade-offs between cost, emissions, and demand response, providing insights for optimizing hybrid energy systems.