A trans-4-(p-N,N-dimethylaminostyryl)-N-vinylbenzylpyridinium chloride (vbDMASP) fluorescence probe was optimized in ground and excited state as a function of change in the microenvironment polarity, using the Amsol HyperChem program package. In the calculations, protic and aprotic solvents were used. On this basis a change in the molecule geometry after excitation, depending on the surrounding solvent, was determined. Absorption and steady-state fluorescence spectra of vbDMASP in the solvent of different polarity and in the model water-glycerol solutions were also recorded. On the basis of Stokes' shift change with the Onsager polarity scale a change in the dipole moment of the probe during transition from ground to excited state, in protic and aprotic solvents was determined. Since during the sol-gel transition of tetraethylorthosilane in the acidic environment both polarity and viscosity of the microenvironment change the vbDMASP probe was applied and fluorescence time-resolved measurements were done. On this basis the correlations between the results of time-resolved measurements for the multichromophoric probe applied in the gelation process and molecular optimization data are discussed.