Antimicrobial photodynamic therapy (APDT) has received a great deal of attention due to its unique ability to kill all currently known classes of microorganisms. To date, infectious diseases caused by bacteria and viruses are one of the main sources of high mortality, mass epidemics and global pandemics among humans. Every year, the emergence of three to four previously unknown species of viruses dangerous to humans is recorded, totaling more than 2/3 of all newly discovered human pathogens. The emergence of bacteria with multidrug resistance leads to the rapid obsolescence of antibiotics and the need to create new types of antibiotics. From this point of view, photodynamic inactivation of viruses and bacteria is of particular interest. This review summarizes the most relevant mechanisms of antiviral and antibacterial action of APDT, molecular targets and correlation between the structure of cationic porphyrins and their photodynamic activity.