In this paper, we investigate the effect of layer thickness on the residual stresses of copper indium gallium diselenide (CIGS) solar cells with polyimide substrate caused by CIGS layer deposition at 400˚C and then cooling down to room temperature using the Finite Element Method (FEM). Moreover, we also examined the effect of layer thickness on residual stress of CIGS solar cells after cooling down to room temperature from the hotspot temperatures of 200˚C, 300˚C, and 400˚C. Our simulated CIGS is composed of five layers: ZnO, CdS, CIGS, Mo, and PI substrate. We were able to quantify the effect of each layer's thickness and hotspot temperature on the average stresses of each layer for the CIGS solar cells. We found that the PI substrate layer has the most significant effect on the residual stress of CIGS solar cells. Our simulation results reveal that the stress type (tensile vs. compressive) and the magnitude of stress of the CIGS layer (main absorber layer) can be controlled by changing the thickness of the PI substrate while applying a heat to CIGS solar cells. Quantitative analysis of relationship between layer thickness and thermo-mechanical stress of thin film solar cells can help solar cell manufacturers design more robust and reliable solar cells. For example, fabricating PI layer thickness less than 17 μm can improve the performance of CIGS solar cells by nullifying the compressive residual stress in the CIGS absorber layer.