Silicon nanowires (SiNWs) are synthesized through a metal-assisted chemical etching (MACE) method using Si(100) substrates and silver (Ag) as a catalyst. Scanning electron microscope (SEM) images confirmed that length of prepared SiNWs was increased when etching time increased. The prepared SiNWs demonstrated considerably low light reflectance at a wavelength range of 200–1100 nm. The photoluminescence (PL) spectra of the grown SiNWs showed a broad emission band peaked at a wavelength of about 750 nm. A solar cell and photodetector based on heterojunction SiNWs/PEDOT:PSS were fabricated using SiNWs that prepared with different etching time and its J–V, sensitivity, and time response were investigated. The conversion efficiency of fabricated solar cell was increased from 0.39% to 0.68% when wire length decreased from 24 µm to 21 µm, respectively. However, the sensitivity of the heterojunction SiNWs/PEDOT:PSS photodetector was decreased from 53774% to 36826% when wire length decreased from 24 µm to 21 µm, respectively.