Photoconductivity in polycrystalline semiconductors can arise from the modulation, by the optical illumination, of the diffusion potentials at the grain boundaries, which in turn control the majority carrier current in these materials. The photogenerated carriers are captured by interface states at the grain boundaries through Shockley-Read-Hall processes, and under constant illumination this affects the steady-state charge at these boundaries so as to reduce the diffusion potentials from their dark values. The dependence of the diffusion potentials and of the photoconductivity upon position is calculated from the dependence of the optical absorption on wavelength. Finally, the average photoconductivity (expected from measurement) of polycrystalline semiconductor thin films is determined as a function of the intensity of the optical illumination, the grain size, the film thickness and the grain-boundary interface parameters.