Flapping wings of insects can passively maintain a high angle of attack due to the torsional flexibility of wing basal region without the aid of the active pitching motion. However, the lift force generated by such passive pitching motion has not been well explored in the literature. Consequently, there is no clear understanding of how torsional wing flexibility should be designed for optimal performance. In this work, a computational study was conducted to investigate the passive pitching mechanism of flapping wings in hovering flight using a torsional spring model. The torsional wing flexibility was characterized by Cauchy number. The impacts of the inertial effect of wings were evaluated using the mass ratio. The aerodynamic forces and associated unsteady flow structures were simulated by an in-house immersed-boundary-method based computational fluid dynamic solver. A parametric study on the Cauchy number was performed with a Reynolds number of 300 at a mass ratio of 1.0, which covers a wide range of species of insect wings. According to the analysis of the aerodynamic performance, we found that the optimal lift can be achieved at a Cauchy number around 0.16, while the optimal efficiency in terms of lift-to-power ratio was reached at a Cauchy number around 0.3. All the corresponding wing pitching kinematics had a pitching magnitude around 60 degrees with slightly advanced rotation. In addition, 3D wake structures generated by the passive flapping wings were analyzed in detail. The findings of this work could provide important implications for designing more efficient flapping-wing micro air vehicles.