In histology, bacterial DNA is important for identifying bacterial infections in tissues. Techniques like in situ hybridization and PCR are used to detect and study bacterial DNA within tissue samples. This can help in diagnosing diseases and understanding the bacterial impact on tissue structure and function.