Natural polymer Bombyx mori silk fibroin is used as a biotemplate to produce silver nanoparticles in situ under light (both incandescent light and sunlight) at room temperature. Silk fibroin provides multiple functions in the whole reaction system, serving as the reducing agent of silver, and the dispersing and stabilizing agent of the resulted silver nanoparticles. As the reaction needs not any other chemicals and only uses light as power source, the synthetic route of silver nanoparticles reported here is rather environment-friendly and energy-saving. The silk fibroin-silver nanoparticle composite prepared by this method can be stably stored in a usual environment (room temperature, exposure to light, and so forth) for at least one month. Such a silk fibroin-silver nanoparticle composite shows an effective antibacterial activity against the methicillin-resistant Staphylcoccus aureus (S. aureus) and subsequently inhibits the biofilm formation caused by the same bacterium. Moreover, a maturely formed biofilm created by methicillin-resistant S. aureus can be destroyed by the silk fibroin-silver nanoparticle composite, which meets the demand of clinical application. Therefore, the silk fibroin-silver nanoparticle composite prepared by this clean and facile method is expected to be an effective and economical antimicrobial material in biomedical fields.