Through a comparative study of the light emission and light excitation property of porous silicon (PS) and Si oxide, photoluminescence (PL) and photoluminescence excitation (PLE) mechanisms for blue-light-emitting PS are analyzed. Strong blue light (445nm) and ultraviolet light (365nm) emission from silicon-rich silicon oxynitride films at room temperature were observed. An analysis of the PL and PLE spectra of PS and Si oxide indicated that for blue-light emission from PS, there are two types of photoexcitation processes: photo-excitation occurring in nanometer Si particles (NSP's) and in the Si oxide layers covering NSPs, and radiative recombination of electron-hole pairs taking place in luminescence centers (LCs) located on the interfaces between NSP's and Si oxide and those inside Si oxide layers. The PL spectra of silicon-rich silicon oxynitride films implies that the PL originated from some LCs in SiOx and SiOxNy:H, while PLE spectra indicates that photoexcitation occurs in NSPs, SiOx and SiOxNy:H. The 365 nm band is attributed to the former two photoexcitation processes and the 445 nm one to the third process. As such, the quantum confinement/luminescence center model appears to be a satisfactory model in explaining the experimental results.