The electronic energy levels of some representative isolated and oxide-supported organic dyes, relevant for photovoltaic applications, are investigated using many-body perturbation theory within the GW approximation. We consider a set of all-organic dyes (denominated L0, L2, L3, and L4) featuring the same donor and anchor groups and differing for the linker moieties. We first calculate the energy levels of the isolated molecules, thus allowing us to address the effects of the different linker groups, and resulting in good agreement with photo-electron spectroscopic and electrochemical data. We then consider the L0 dye adsorbed on the (101) surface of anatase-TiO2. We find a density of occupied states in agreement with experimental photo-electron data. The HOMO-LUMO energy gap of the L0 dye is found to be reduced by ~1 eV upon adsorption. Our results validate the reliability of GW calculations for photovoltaic applications and point to their potential as a powerful tool for the screening and rational design of new components of electrochemical solar cells.