We report results of combined experimental and theoretical studies of dye‐sensitized solar cells (DSSCs) using 5‐(4‐sulfophenylazo)salicylic acid disodium salt, known as Mordant Yellow 10 (MY‐10), as TiO2 sensitizer. We focus on a single dye but vary the solvent and the pH of the solution as well as the photoelectrode preparation conditions to determine the conditions for best photovoltaic conversion efficiency. We found experimentally that the efficiency, measured under standard air mass 1.5 global (AM 1.5G) conditions, was higher in solutions of ethanol than of water, but still small (up to 0.174%), although the fill factor (FF) was large (up to 0.73). Of the dyes in ethanol, MY‐10 in alkaline solution showed the best matching of the solar spectrum but displayed the lowest efficiency. Density functional theory (DFT) calculations provided the optimized geometry, electronic structure, and electronic spectrum of the dye in fully protonated as well as partially and totally deprotonated forms, in solution. The calculated optical spectra are consistent with the experimental data, with strong absorption in the visible range only for the alkaline dye solution. The low device efficiency is very likely related to the weak optical absorption in the visible range. The much higher photovoltaic conversion efficiency of the DSSCs fabricated using acid or roughly neutral pH solutions, corresponding to the protonated and partially deprotonated forms of MY‐10, respectively, is likely caused by the better alignment of the ground state of the dye with the redox level of the electrolyte. The decrease with pH of the dye solution of the short‐circuit current was linked to a weaker charge injection from the excited state of the dye to the conduction band of the oxide, which is correlated with the shifting of the excited state of the dye deeper into the CB edge of the semiconductor. The variation of the open‐circuit voltage with the pH of the solution was linked to the adjustment of the conduction band edge of TiO2, depending on the number of protons transferred from the dye to the oxide surface. Based on our results, we analyze the relative importance of the main criteria that should be met by a dye to be used in a DSSC.