We determined the carrier diffusion lengths in TiO2 nanoporous layers of dye-sensitized solar cells by using scanning photocurrent microscopy using an ultraviolet laser. Here, we excited the carrier directly in the nanoporous layers where the diffusion lengths were found to 140 μm as compared to that of visible illumination measured at 90 μm. The diffusion length decreased with increasing laser modulation frequency, in which we determined the electron lifetimes and the diffusion coefficients for both visible and UV illuminations. The diffusion lengths have been studied in terms of the sintering temperatures for both cells with and without binding molecules. We found a strong correlation between the diffusion length and the overall light-to-current conversion efficiency, proving that improving the diffusion length and hence the interparticle connections, is key to improving cell efficiency.