An effective rigorous 3-D optical modeling of thin-film silicon solar cells based on finite element method (FEM) is presented. The simulation of a flat single junction thin-film silicon solar cell on thick glass (i.e., superstrate configuration) is used to validate a commercial FEM-based package, the High Frequency Structure Simulator (HFSS). The results are compared with those of the reference software, Advanced Semiconductor Analysis (ASA) program, proving that the HFSS is capable of correctly handling glass as an incident material within very timely, short, and numerically stable calculations. By using the HFSS, we simulated single junction thin-film silicon solar cells on glass substrates textured with one-dimensional (1-D) and two-dimensional (2-D) trapezoid-shaped diffraction gratings. The correctness of the computed results, with respect to an actual device, is discussed, and the impact of different polarizations on spectral response and optical losses is examined. From the simulations carried out, optimal combinations for period and height in both 1-D and 2-D grating configurations can be indicated, leading to short-circuit current percentage increase with respect to a flat cell of, respectively, 25.46% and 32.53%. With very limited computer memory usage and computational time in the order of tens of minutes for a single simulation, we promote the usage of 3-D FEM as a rigorous and efficient way to simulate thin-film silicon solar cells.