A computer stimulation procedure is developed for investigating the dynamics of photoinduced conformational switching in organic molecules. In harmonic approximation, an analytical expression is obtained for the one-photon quantum transition probability, giving its dependence on the frequency matrices and displacements of the normal modes of two electronic terms. Absorption-emission spectra are calculated for the isolated stilbene molecule and are compared with the available experimental spectra obtained in supersonic jets, for adjusting the parameters of the excited state potential energy surface. Excitation with a 20 fs Gaussian laser pulse is considered. The distribution of the excitation energy between 72 normal modes of stilbene is calculated. It is shown that only four modes share 82.5% of the excitation. An MD simulation is performed to reveal a mechanism of the trans-cis isomerization of stilbene.