In this work, density functional theory is applied to several models as representative parts in dye-sensitized solar cells (DSSCs). The performance of flexible hybrid exchange-correlation functionals is evaluated for the calculation of ground- and excited-state properties pertaining to DSSC model systems. The electronic structure of isolated dyes, TiO \(_2\) clusters, and dyes anchored on a sizeable (TiO \(_2\) ) \(_{38}\) cluster are calculated with hybrid exchange-correlation functionals based on different mathematical forms to incorporate exact exchange. This enables the analysis of level alignments at the dye-TiO \(_2\) interface within the TDDFT framework, with respect to the role of the exact exchange in various hybrid functionals. Particular emphasis is placed on the assessment of a recently introduced local hybrid functional with range separation which has been shown to improve energies for charge-transfer excitations. Our results indicate that the HOMO–LUMO gap of TiO \(_2\) clusters that are frequently used to represent the surface of the nanoparticles is significantly larger than the experimental band gap of bulk anatase TiO \(_2\) (3.2 eV). It is also demonstrated that exchange-correlation functionals with long-range exact exchange perform well for the simulation of UV–Vis spectra of excited organic donor-acceptor dyes and the calculation of band gaps of TiO \(_2\) clusters, but yield unphysical level alignments at dye-semiconductor interfaces with TDDFT. We further highlight the importance to allow excitations from all occupied orbitals for the calculation of UV–Vis spectra with linear-response TDDFT of organic dyes adsorbed on TiO \(_2\) clusters.