Modeling the optical response of photosynthetic pigments is an integral part of the study of fundamental physical processes of interaction between multi-atomic molecules and the external electromagnetic field. In contrast to ab initio methods for calculating the ground and excited states of a molecule, the use of semiclassical quantum theories allows us to use characteristic functions, such as spectral density, to calculate absorption spectra rather than considering the full set of electron and atom configurations. The main disadvantage of this approach is the comparison of calculated and experimental spectra and, as a consequence, the need to justify the uniqueness of the obtained parameters of the system under study and to evaluate their statistical significance. In order to improve the quality of the optical response calculation, a heuristic evolutionary optimization algorithm was used in this work, which minimizes the difference between the measured and theoretical spectra by determining the most appropriate set of model parameters. It is shown that, using as an example the spectra of photosynthetic pigments measured in different solvents, the optimization of modeling allowed us to obtain a good agreement between the calculated and experimental data and to unambiguously determine the electron-phonon interaction coefficients for the electronic excited states of chlorophyll, lutein and β-carotene.