In the present study we use the Scanning Tunneling Microscope (STM) as an instrument to investigate the photovoltaic properties of semiconducting materials. The surfaces of the layered semiconductor WSe2 were optically illuminated during the tunneling process. The resulting photo-induced tunneling current (PITC) was measured as a function of the wavelength. Microscopic information on the energy dependent generation and recombination of the photo-electrons in the vicinity of the tunneling tip was obtained by this method without the necessity of covering the surface with a conducting electrode. The analysis of the wavelength dependence of the PITC points at the existence of excitonic excitations. Compared to the spectral response of conventional photosensitive heterodiodes our PITC spectra exhibit a more structured response and an increase of the signal in the UV region. Finally, PITC studies on differently treated WSe2 surfaces show an improved photoactivity for WSe2 crystals treated with NaI/I2 solutions.