A metal-assisted chemical etching process employing p-type silicon wafers with varied etching durations is used to produce silicon nanowires. Silver nanoparticles prepared by chemical deposition are utilized as a catalyst in the formation of silicon nanowires. Images from field emission scanning electron microscopy confirmed that the diameter of SiNWs grows when the etching duration is increased. The photoelectrochemical cell's characteristics were investigated using p-type silicon nanowires as working electrodes. Linear sweep voltammetry (J-V) measurements on p-SiNWs confirmed that photocurrent density rose from 0.20 mA cm-2 to 0.92 mA cm-2 as the etching duration of prepared SiNWs increased from 15 to 30 min. The conversion efficiency (ƞ) was 0.47 for p-SiNWs prepared with a 15-minute etching time and 0.75 for p-SiNWs prepared with a 30-minute etching time. The cyclic voltammetry (CV) experiments performed at various scan rates validated the faradic behavior of p-SiNWS prepared for 15 and 30 min of etching. Because of the slow ion diffusion and the increased scanning rate, the capacitance decreased with increasing scanning rate. Mott-Schottky (M-S) investigation showed a significant carriers concentration of 3.66×1020 cm-3. According to the results of electrochemical impedance spectroscopy (EIS), the SiNWs photocathode prepared by etching for 30 min had a charge transfer resistance of 25.27 Ω, which is low enough to enhance interfacial charge transfer.