Diffusion current causes drift current?
Before illumination, the charge density at any point is zero in the semiconductor. Once illuminated, the generated excess carriers (electron hole pair) start diffusing into the semiconductor. If both the carriers diffuses in the same manner, the semiconductor will be having zero charge density at each and every point.

But electron and hole has different diffusion coeffient, which makes the diffusion profile different and makes some part of the semiconductor to have positive charge density and some other part to have negative charge density. This creates an internal electric field from positive to negative.