Polyacrylamide and dextran-graft-polyacrylamide hydrogels are prepared and used as nanoreactors and networks for the synthesis of silver nanoparticles (AgNPs). Photochemical generation of AgNPs is carried out under UV-irradiation of Ag+ ions in swollen hydrogels of different cross-linking densities. The obtained hydrogels and hydrogel/AgNPs composites are characterized by TEM, FTIR, and UV–Vis spectroscopy. Swelling studies have shown a relationship between the structure of the hydrogels and their ability to swell. It is shown that the presence of AgNPs in the polymer network leads to a decrease of the swelling capacity. An increase in the cross-linking density leads to an expansion of the AgNPs size distribution for both types of hydrogels. All synthesized hydrogel-silver nanoparticle composites have shown a high activity in the growth retardation of Staphylococcus aureus microorganisms.