Structural and optical properties of isolated perylene-3,4,9,10-tetracarboxylic acid dianhydride molecules adsorbed on (100) oriented NaCl and KCl surfaces were studied theoretically to analyze the recently observed red-shift of the optical excitation spectrum after adsorption (Müller et al., Phys. Rev. B, 2011, 83, 241203; Paulheim et al. Phys. Chem. Chem. Phys., 2013, 15, 4906). The ground-state structures were obtained by periodic dispersion-corrected density functional theory (DFT) calculations. For the excited-state calculations, nonperiodic time-dependent DFT methods were applied for a cluster model embedded in point charges. The range-separated hybrid functional CAM-B3LYP was used. Correlation-consistent basis sets were used and the calculated excitation energies were extrapolated to the complete basis set limit. The shift of the first optical excitation energy was analyzed in terms of electronic and geometric contributions. It was found that both the distortion of the molecule due to the interaction with the surface and the electrostatic potential of the surface play an important role.