With increasing concerns about public health and the development of molecular techniques, new detection tools and the combination of existing approaches have increased the abilities of pathogenic bacteria monitoring by exploring new biomarkers, increasing the sensitivity and accuracy of detection, quantification, and analyzing various genes such as functional genes and antimicrobial resistance genes (ARG). Molecular methods are gradually emerging as the most popular detection approach for pathogens, in addition to the conventional culture-based plate enumeration methods. The analysis of pathogens in wastewater and the back-estimation of infections in the community, also known as wastewater-based epidemiology (WBE), is an emerging methodology and has a great potential to supplement current surveillance systems for the monitoring of infectious diseases and the early warning of outbreaks. However, as a complex matrix, wastewater largely challenges the analytical performance of molecular methods. This review synthesized the literature of typical pathogenic bacteria in wastewater, types of biomarkers, molecular methods for bacterial analysis, and their recent advances in wastewater analysis. The advantages and limitation of these molecular methods were evaluated, and their prospects in WBE were discussed to provide insight for future development.