The greater the demand for energy, the more important it is to improve and develop permanent energy sources, because of their advantages over non-renewable energy sources. With the development of artificial intelligence algorithms and the presence of so many data, the evolution of simulation models has increased. In this research, an improvement to one recent optimization algorithm called the artificial hummingbird algorithm (AHA) is proposed. An adaptive opposition approach is suggested to select whether or not to use an opposition-based learning (OBL) method. This improvement is developed based on adding an adaptive updating mechanism to enable the original algorithm to obtain more accurate results with more complex problems, and is called the adaptive opposition artificial hummingbird algorithm (AOAHA). The proposed AOAHA was tested on 23 benchmark functions and compared with the original algorithm and other recent optimization algorithms such as supply–demand-based optimization (SDO), wild horse optimizer (WHO), and tunicate swarm algorithm (TSA). The proposed algorithm was applied to obtain accurate models for solar cell systems, which are the basis of solar power plants, in order to increase their efficiency, thus increasing the efficiency of the whole system. The experiments were carried out on two important models—the static and dynamic models—so that the proposed model would be more representative of real systems. Two applications for static models have been proposed: In the first application, the AOAHA satisfies the best root-mean-square values (0.0009825181). In the second application, the performance of the AOAHA is satisfied in all variable irradiance for the system. The results were evaluated in more than one way, taking into account the comparison with other modern and powerful optimization techniques. Improvement showed its potential through its satisfactory results in the tests that were applied to it.