Room temperature photoluminescence (PL) with a peak at 1.54 microns was observed from silicon oxide, silicon-rich silicon oxide, silicon nitride and silicon-rich silicon nitride films, all doped with Er and grown by the magnetron sputtering technique. To determine the optimum annealing temperature for the 1.54 microns PL, these films were annealed in the range of 600-1,100 degrees C with an interval of 100 degrees C. Among these four types of films annealed at an identical temperature, the intensity of 1.54 microns PL peak of the Er-doped silicon-rich silicon oxide film was always the strongest one, which arrived at a maximum in 800 degrees C annealing. A 1.38 microns PL band was also observed in each of these four types of films, and which in the silicon-rich silicon oxide or silicon-rich silicon nitride films was found to be correlated with the 1.54 microns PL band in intensity.