A series of D-π-A type dyes were designed based on the experimentally synthesized A1 by introducing different functional groups on the donor and π-spacer, and the optical and electrical properties were calculated by using density functional theory (DFT) and time-dependent DFT (TD-DFT). P1–P6 present highest light harvesting efficiency (LHE), driving force of electron injection (ΔGinject), reorganization energy (ΔGreg) and eVOC. These critical parameters have a close relationship with the short-circuit current density (JSC) and open-circuit photovoltage (VOC), and lead to P1–P6 will exhibit higher efficiency. D4 also exhibit superior properties in the driving force of electron injection (ΔGinject), reorganization energy (ΔGreg), which will lead to a higher short-circuit current density (JSC). We hope that these results will be helpful for experiments to synthesize new and highly efficient dyes.