We report the design and optimization of photonic crystal (PhC) structures within a GaAs or InAs absorption layer in thin film solar cells. In the PhC structure, hexagonal cylinder hole scatterers with the same upper and lower surfaces are used, and the cases of air and silica filled within these hexagonal hole scatterers are discussed, respectively. We designed and optimized the PhC absorption layer structures with four different conditions: the bulk materials comprising the absorption layer are either GaAs or InAs, and the hexagonal hole PhC scatterers are filled with either air or silica. The simulation results indicate that the absorptivity of the absorption layer can be greatly improved by using a PhC structure within the absorption layer. For height H = 0.20 µm, the maximum absorptivity of the GaAs absorption layer is 79.51%, while the maximum absorptivity of the InAs absorption layer is 96.57%. In addition, the absorptivity of the PhC structured absorption layer is less affected by the light incident angle, as the absorptivity of the structure is above 65% even when the light incident angle is 70°. Meanwhile, the porous PhC structure within the absorption layer is ideal for the filling of quantum dots, which has little effect on the absorptivity of light but can greatly improve the photoelectric conversion efficiency.