Climate change is a global issue that requires collective action to address. One of the most pressing concerns is reducing emissions resulting from combustion processes. The use of renewable energy sources and green energy has become a trend worldwide. Solar energy is one of the most promising sources due to its abundance and simplicity of implementation. The city of Aswan, located in the South of Egypt, has a high solar radiation that makes it ideal for utilizing solar power. The current study investigates the optimal design for a sustainable building electricity system at the Aswan Campus of the Arab Academy for Science, Technology & Maritime Transport (AASTMT) in Egypt. The campus has four electricity sources: a utility grid, PV panels, batteries, and a diesel generator, along with a weather station. Experimental investigations have been carried out in this research paper to study the performance characteristics of solar power. Moreover, HOMER pro software is used to model various configurations of the campus grid, including different photovoltaic (PV) panel types and tracking systems. The simulations are compared with real-world data collected from a weather station on campus. Additionally, CO2 and NO2 emissions are measured to assess the environmental impact of different scenarios. The total net cost over the life cycle is also calculated for different cases. The results demonstrate that the addition of a PV renewable system can reduce traditional grid usage by 38% and emissions by 50%. A decrease in the Levelized Cost of Energy (LOCE) from USD 0.0647 to USD 0.0535 is reported. Moreover, the difference in NCP cost between dual-axis tracking and fixed zero angle is USD 143,488. The dual degree tracker for PV panels can further enhance energy production by 30% more, compared with fixed panels, while reducing carbon dioxide emissions by more than 20%. The simulation results reveal that tracking systems provide greater energy generation, and that a cost–benefit analysis may prioritize fixed panels in some cases. The results from the HOMER software simulations closely match those of the experimental data, which is that the total presentation error does not exceed 8%, demonstrating the software’s effectiveness for optimizing renewable energy systems. This study demonstrates that a comprehensive analysis and optimization of a building’s energy sources can significantly reduce costs, lower emissions, and promote the use of renewable energy, particularly solar power.