Identification of bacterial strains is critical for the theranostics of bacterial infections and the development of antibiotics. Many organic fluorescent probes have been developed to overcome the limitations of conventional detection methods. These probes can detect bacteria with “off-on” fluorescence change, which enables the real-time imaging and quantitative analysis of bacteria in vitro and in vivo. In this review, we outline recent advances in the development of fluorescence-based dyes capable of detecting bacteria. Detection strategies are described, including specific interactions with bacterial cell wall components, bacterial and intracellular enzyme reactions, and peptidoglycan synthesis reactions. These include theranostic probes that allow simultaneous bacterial detection and photodynamic antimicrobial effects. Some examples of other miscellaneous detections in bacteria have also been described. In addition, this review demonstrates the validation of these fluorescent probes using a variety of biological models such as gram-negative and -positive bacteria, antibiotic-resistant bacteria, infected cancer cells, tumor-bearing, and infected mice. Prospects for future research are outlined by presenting the importance of effective in vitro and in vivo detection of bacteria and development of antimicrobial agents.