In order to study a role of Si dangling bonds in the Er photoluminescence mechanism in a-Si:H, we prepared Er-doped a-Si:H films with various densities of Si dangling bonds using rf magnetron sputtering method. The density of Si dangling bonds was changed by three ways: (1) change of Ar-to-H2 gas ratio in the sputtering ambient, (2) light soaking and (3) annealing. The intensity of the Er photoluminescence at 1540 nm tends to decrease with increasing the density of Si dangling bonds in the first two cases. In the case of annealing, the intensity of the Er photoluminescence first increases with a decrease in the density of Si dangling bonds due to the structural relaxation up to 250 °C and continues to increase up to 350 °C even though the density of Si dangling bonds increases due to hydrogen evolution. This increase in the photoluminescence intensity is probably caused by a change of the environment of Er ions.