The impact of the optical band gap (E g ) of a p-type hydrogenated nanocrystalline silicon layer on the short-circuit current density (J sc ) of a thin-film silicon solar cell is assessed. We have found that the J sc reaches maximum when the E g reaches optimum. The reason for the J sc on E g needs to be clarified. Our results exhibit that maximum J sc is the balance between dark current and photocurrent. We show here that this dark current results from the density of defects in the p-layer and the barrier at the interface between p-and i-layers. An optimum cell can be designed by optimizing the p-layer via reducing the density of defects in the p-layer and the barrier at the p/i interface. Finally, a 6.6% increase in J sc was obtained at optimum E g for n-i-p solar cells.