A first-principles study of the optical properties of silicon quantum dots (Si QDs) with different diameters is presented in this paper. Si QDs consisting of 10-220 Si atoms, the corresponding diameter ranges from 6-20 Å, with full termination of the Si interface with H are investigated in detail. The results show that both the band gap and the absorption spectrum of Si QDs are size-dependent. For Si QDs with diameter ranges from 6-20 Å, as the diameter decreases, the band gap increases, and a considerable blue-shift in the absorption spectrum is occurred. This unique property can be used to extend the absorption spectrum of the solar cell by mixing in QDs with different sizes. Therefore, the full spectrum of the sunlight may be utilized more efficiently.