Thin film solar cells, which are the second generation of solar cells, have recently attracted much attention due to their low cost and abundance of fabrication materials. But due to the reduction in the thickness of the absorber layer in this generation to <0.5 μm, the amount of absorption is greatly reduced and the short circuit current density (J sh ) decreased due to the reduction of the light path length in the semiconductor. Therefore, light trapping is challenging in this generation to compensate for the reduced short circuit current. In this work, crystalline and amorphous silicon thin film solar cells, which are types of thin film solar cells have been investigated. In this study, using silver metal gratings with triangular and rectangular shapes on the back electrode of the solar cell, we investigated the effect of the grating structure on increasing absorption of the solar cell. Crystalline silicon (c-Si) and amorphous silicon (a-Si) have been used as absorber layer material due to their unique characteristics, such as low cost, abundance, and well established. The results show that by applying the optimal structure of grating in crystalline silicon solar cells, compared with the simple solar cell, the efficiency and short current of the cell increased from 8.87% and 16.81 (mA∕cm 2 ) to 13.34% and 24.78 (mA∕cm 2 ), respectively. And for the solar cell with amorphous silicon absorber layer, this increase in efficiency and short circuit current has reached from 14.75% and 28.74 (mA∕cm 2 ) to 15.22% and 29.6 (mA∕cm 2 ), respectively. This increase in electrical parameters of solar cells illustrates the positive effects of back grating structures in improvement of solar cell performance.