We describe the effects of implantation of silicon into pure amorphous silicon and hydrogenated amorphous silicon and of erbium into soda-lime silicate glass and hydrogenated amorphous silicon. The former implantations and subsequent annealing treatments are used as a means of controlled defect creation. The experiments lead to new insights into the relation between defect density and bond-angle variation in both types of amorphous silicon. Erbium implantation is used to produce planar optical waveguide materials. It is demonstrated that erbium implantation into glass and amorphous silicon leads to efficient photoluminescence. It appears that these materials are attractive candidates for Er-doped waveguide amplifiers.