Novel donor-pi-acceptor dyes bearing the pyrimidine unit as an electron-withdrawing group have been synthesized by using combination of two processes, based on the microwave-assisted Suzuki cross-coupling reaction and nucleophilic aromatic substitution of hydrogen. Spectral properties of the obtained dyes in six aprotic solvents of various polarities have been studied by ultraviolet-visible and fluorescence spectroscopy. In contrast to the absorption spectra, fluorescence emission spectra displayed a strong dependence from their solvent polarities. The nature of the observed long wavelength maxima has been elucidated by means of quantum chemical calculations. The electrochemical properties of these dyes have been investigated by using cyclic voltammetry, while their photovoltaic performance was evaluated by a device fabrication study. The experimental and calculation data show that all of the dyes can be regarded as potentially good photosensitizers for dye-sensitized solar cells.