We show, by means of ab-initio calculations, that by properly controlling the doping a significant modification of both the absorption and the emission of light of silicon nanocrystals can be achieved. We have considered impurities, boron and phosphorous (codoping), located at different substitutional sites of silicon nanocrystals with size ranging from 1.1 to 1.8 nm in diameter. We have found that the codoped nanocrystals have the lowest impurity formation energies when the two impurities occupynearest neighbour sites near the surface. In addition, such systems present band-edge states localized on the impurities giving rise to a red-shift of the absorption thresholds with respect to that of undoped nanocrystals. Our detailed theoretical a...