2020 by the authors. Dye-sensitized solar cells offer an alternative source for renewable energy by means of converting sunlight into electricity. While there are many studies concerning the development of DSSCs, comprehensive mathematical modelling of the devices is still lacking. Recent mathematical models are based on diffusion equations of electron density in the conduction band of the nano-porous semiconductor in dye-sensitized solar cells. Under linear diffusion and recombination, this paper provides analytical solutions to the diffusion equation. Further, Lie symmetry analysis is adopted in order to explore analytical solutions to physically relevant special cases of the nonlinear diffusion equations. While analytical solutions may not be possible, we provide numerical solutions, which are in good agreement with the results given in the literature.