Since thin-film silicon solar cells have limited optical absorption, we explore the effect of a nanostructured back reflector to recycle the unabsorbed light. As a back reflector we investigate a 3D photonic band gap crystal made from silicon that is readily integrated with the thin films. We numerically obtain the optical properties by solving the 3D time-harmonic Maxwell equations using the finite-element method, and model silicon with experimentally determined optical constants. The absorption enhancement relevant for photovoltaics is obtained by weighting the absorption spectra with the AM 1.5 standard solar spectrum. We study thin films either thicker ($L_{Si} = 2400$ nm) or much thinner ($L_{Si} = 80$ nm) than the wavelength of light. At $L_{Si} = 2400$ nm, the 3D photonic band gap crystal enhances the spectrally averaged ($lambda = 680$ nm to $880$ nm) silicon absorption by $2.22$x (s-pol.) to $2.45$x (p-pol.), which exceeds the enhancement of a perfect metal back reflector ($1.47$ to $1.56$x). The absorption is enhanced by the (i) broadband angle and polarization-independent reflectivity in the 3D photonic band gap, and (ii) the excitation of many guided modes in the film by the crystals surface diffraction leading to enhanced path lengths. At $L_{Si} = 80$ nm, the photonic crystal back reflector yields a striking average absorption enhancement of $9.15$x, much more than $0.83$x for a perfect metal, which is due to a remarkable guided mode confined within the combined thickness of the thin film and the photonic crystals Bragg attenuation length. The broad bandwidth of the 3D photonic band gap leads to the back reflectors Bragg attenuation length being much shorter than the silicon absorption length. Consequently, light is confined inside the thin film and the absorption enhancements are not due to the additional thickness of the photonic crystal back reflector.