We report on simulations and measurements of the optical absorption of silicon nanowires (NWs) versus their diameter. We first address the simulation of the optical absorption based on two different theoretical methods : the first one, based on the Green function formalism, is useful to calculate the scattering and absorption properties of a single or a finite set of NWs. The second one, based on the Finite Difference Time Domain (FDTD) method is well-adapted to deal with a periodic set of NWs. In both cases, an increase of the onset energy for the absorption is found with increasing diameter. Such effect is experimentally illustrated, when photoconductivity measurements are performed on single tapered Si nanowires connected between a set of several electrodes. An increase of the nanowire diameter reveals a spectral shift of the photocurrent intensity peak towards lower photon energies, that allows to tune the absorption onset from the ultraviolet radiations to the visible light spectrum.