This article presents a photovoltaic (PV) optimization approach using the puma optimizer (PO) approach, which has been enhanced by utilizing Lévy flight optimization. The name of this approach is modified puma optimizer (MPO). PV generation systems are essential for sustainable solar energy utilization. It is an innovation and clean energy. There is an urgent demand for suitable and reliable simulation and optimization techniques for PV systems. This will result in increased efficiency. Algorithms with a high degree of reliability are needed to ensure optimal PV parameters. This study was conducted with MATLAB software. This article introduces the original PO method as a means to evaluate the performance of the MPO approach. The root mean square error (RMSE) function serves as a benchmark. Based on the simulation findings, the MPO approach shows superior RMSE compared to the PO method, specifically at a value of 0.0026%.