Parameter extraction of solar cell models plays an important role in the simulation, evaluation, control, and optimization of the photovoltaic (PV) system. Although many meta-heuristic algorithms have been proposed to solve the parameter extraction, it is necessary to further improve the accuracy and reliability of these algorithms. In this paper, an optimized teaching-learning-based optimization (TLBO) is proposed, namely dynamic self-adaptive and mutual-comparison teaching-learning-based optimization (DMTLBO). DMTLBO enhances the basic TLBO by improving its teacher phase and learner phase: (i) In the teacher phase, two differentiated and personalized teaching strategies are proposed according to learners’ learning status. In these two strategies, an adaptive state transition weight factor $\omega $ and a dynamic gap weight factor $\beta $ are introduced to reflect the dynamic transformation of the learners’ learning state in the actual teaching situation. (ii) In the learner phase, a new learning strategy is proposed. The learner can communicate and learn with three different learners who are randomly selected and ranked. To verify the performance of the DMTLBO algorithm, it is used to extract the parameters of different PV models, such as the single diode model, the double diode model, and three PV modules. Among these PV models, the root mean square error values between the measured data and the calculated data of DMTLBO are 9.8602E-04 ± 2.07E-17, 9.8248E-04 ± 1.53E-06, 2.4251E-03 ± 2.15E-17, 1.7298E-03 ± 5.74E-14, and 1.6601E-02 ± 4.55E-10, respectively. Compared with other optimization algorithms, the experimental results show that DMTLBO can provide better or highly competitive convergence speed and extraction accuracy. Besides, the influence of the improved teacher phase and learner phase on DMTLBO and the changing process of both weight factors $\omega $ and $\beta $ are investigated.