In recent times, there have been notable advancements in solar energy and other renewable sources, underscoring their vital contribution to environmental conservation. Solar cells play a crucial role in converting sunlight into electricity, providing a sustainable energy alternative. Despite their significance, effectively optimizing photovoltaic system parameters remains a challenge. To tackle this issue, this study introduces a new optimization approach based on the coati optimization algorithm (COA), which integrates opposition-based learning and chaos theory. Unlike existing methods, the COA aims to maximize power output by integrating solar system parameters efficiently. This strategy represents a significant improvement over traditional algorithms, as evidenced by experimental findings demonstrating improved parameter setting accuracy and a substantial increase in the Friedman rating. As global energy demand continues to rise due to industrial expansion and population growth, the importance of sustainable energy sources becomes increasingly evident. Solar energy, characterized by its renewable nature, presents a promising solution to combat environmental pollution and lessen dependence on fossil fuels. This research emphasizes the critical role of COA-based optimization in advancing solar energy utilization and underscores the necessity for ongoing development in this field.