A dye-sensitized solar cell (DSSC) with FTO/TiO2/Dye/Electrolyte/FTO structure was simulated by using SILVACO ATLAS software. To optimize the charge transfer at the TiO2/dye/electrolyte interface, an Al-Modified TiO2 layer was used and its influence on photovoltaic performance was investigated. Optimized solar cell showed maximum power conversion efficiency of 7.67% with short-circuit current of 16.50 mA/cm2 and open-circuit voltage of 0.72 V at 100mW cm−2 (1.5 A M). To resolve the difficulties regarding the use of liquid electrolyte, a solid-state dye-sensitized solar cell (SS-DSSC) was simulated in which a P3HT layer acts as a hole collector instead of liquid electrolyte. SS-DSSC indicated a favorable performance deliver a short-circuit photocurrent of 12.70 mA cm−2 and open-circuit voltage of 0.67 V.