Tetrabromophenol blue and Bromoxylenol blue as the sensitizers of dye-sensitized solar cells (DSSCs) are measured in experiments. In order to better understand the photoelectrical properties of the two dyes, we obtain the UV-Vis spectra, fluorescence spectra, and current-voltage characteristics. The frontier molecular orbital, energy levels, the first hyperpolarizability, the first hyperpolarizability density, and molecular electrostatic potential are calculated with density functional theory (DFT) and time-dependent DFT (TDDFT). The critical factors including the light harvesting efficiency (LHE (Tetrabromophenol blue for 0.0284 and Bromoxylenol blue for 0.0290), the driving force of electron injection (ΔG inject ), x-axis direction dipole moment (μ normal ), the conduction band of edge of the semiconductor (ΔE CB ), and the excited-state lifetime (τ)) are computed, which have a close connection to the short-circuit current density (J sc ) and open-circuit voltage (V oc ). The results show that the J sc (0.09 mA/cm 2 ) and V oc (0.39 V) of Tetrabromophenol blue have larger values, which can be explained by a larger absolute value of ΔG inject , absolute value of μ normal , τ, and ΔE CB . Therefore, Tetrabromophenol blue displays well photoelectric conversion efficiency compared with Bromoxylenol blue.