Inspired by a previous experimental study on the first-order hyperpolarizabilities of 1,3-thiazolium-5-thiolates mesoionic compounds using the hyper-Rayleigh scattering technique, we theoretically investigated the UV-vis absorption spectra and every-order polarizabilities of these mesoionic molecules. Based on the fact that the photophysical and nonlinear properties observed in the experiment can be perfectly replicated, our theoretical calculations explored the essential characteristics of the optical properties of the mesoionic compounds with different electron-donating groups at the level of electronic structures through various wave function analysis methods. The influence of the electron-donating ability of the donor on the optical properties of the molecules and the contribution of the mesoionic ring moiety to their optical nonlinearity are clarified, which have not been reported by any research so far. This work will help people understand the nature of optical properties of mesoionic-based molecules and provide guidance for the rational design of molecules with excellent photoelectric performance in the future.