In 1D photonic crystal Bragg structures, strong localization of the light occurs in the high refractive index layers at wavelengths on the red edge of the photonic bandgap. We exploit this slow light effect for thin film solar cells in order to increase the absorption of light in silicon, as the latter has a high refractive index. Amorphous silicon and a transparent conductive oxide are chosen as high-index and low-index materials, respectively. Reference thin film cells have equivalent total thickness of amorphous silicon, plus antireflection coating and optional metallic back mirror. Through transfer-matrix calculations, we demonstrate that the spectrally integrated photon flux absorbed in active layers, hence the photocurrent, is enhanced by at least 10% with respect to reference using only a few periods. The enhancement is robust with respect to the light incidence angle. The key of such an enhancement is the tuning of the red edge to both the solar irradiance spectrum and the intrinsic material absorption spectrum, which is achieved by suitably selecting the layer thicknesses.