Microbial diseases have been declared one of the main threats to humanity, which is why, in recent years, great interest has been generated in the development of nanocomposites with antimicrobial capacity. The present work studied two magnetic nanocomposites based on graphene oxide (GO) and multiwall carbon nanotubes (MWCNTs). The synthesis of these magnetic nanocomposites consisted of three phases: first, the synthesis of iron magnetic nanoparticles (MNPs), second, the adsorption of the photosensitizer menthol-Zinc phthalocyanine (ZnMintPc) into MWCNTs and GO, and the third phase, encapsulation in poly (N-vinylcaprolactam-co-poly(ethylene glycol diacrylate)) poly (VCL-co-PEGDA) polymer VCL/PEGDA a biocompatible hydrogel, to obtain the magnetic nanocomposites VCL/PEGDA-MNPs-MWCNTs-ZnMintPc and VCL/PEGDA-MNPs-GO-ZnMintPc. In vitro studies were carried out using Escherichia coli and Staphylococcus aureus bacteria and the Candida albicans yeast based on the Photodynamic/Photothermal (PTT/PDT) effect. This research describes the nanocomposites’ optical, morphological, magnetic, and photophysical characteristics and their application as antimicrobial agents. The antimicrobial effect of magnetics nanocomposites was evaluated based on the PDT/PTT effect. For this purpose, doses of 65 mW·cm−2 with 630 nm light were used. The VCL/PEGDA-MNPs-GO-ZnMintPc nanocomposite eliminated E. coli and S. aureus colonies, while the VCL/PEGDA-MNPs-MWCNTs-ZnMintPc nanocomposite was able to kill the three types of microorganisms. Consequently, the latter is considered a broad-spectrum antimicrobial agent in PDT and PTT.