Quantum chemistry calculations of energies, geometries, electronic structures, polarizabilities, and < hyperpolarizabilities of organic dye sensitizer 2-aminopyrimidine-5-carbonitrile were studied based on ab initio HF and Density Functional Theory (DFT) using the hybrid functionalsB3LYP. Ultraviolet-visible (UV-Vis) spectrum was investigated by Time Dependent DFT (TDDFT). Features of the electronic absorption spectrum in the visible and near-UV regions were assigned based on TDDFT calculations. The absorption bands are assigned to π→π* transitions. Calculated results suggest that the three excited states with the lowest excited energies in 2-aminopyrimidine-5-carbonitrile is due to photo induced electron transfer processes. The interfacial electron transfer between semiconductor TiO2 electrode and dye sensitizer2-aminopyrimidine-5-carbonitrile, is due to an electron injection process from excited dye to the semiconductor’s conduction band. The role of amine and nitrile group in 2-aminopyrimidine-5-carbonitrile geometries, electronic structures, and electronic absorption spectra were analyzed in Dye sensitizer solar cell (DSSC) give a good conversion efficiency.