We show that the electronic and optical properties of silicon nanowires, with different size and orientation, are dominated by important many-body effects. The electronic and excitonic gaps, calculated within first principles, agree with the available experimental data. Huge excitonic effects, which depend strongly on wire orientation and size, characterize the optical spectra. Modeling porous silicon as a collection of interacting nanowires, we find an absorption spectrum which is in very good agreement with experimental measurements only when the electron-hole interaction is included.