Imidazole is a five-membered heterocyclic ring containing three carbon atoms, two nitrogen atoms, and two double bonds. Among two nitrogen atoms, one of which carries with a hydrogen atom is a pyrrole-type nitrogen atom, another is a pyridine type nitrogen atom. Hence, the imidazole ring belongs to the π electron-rich aromatic ring and can accept strong suction to the electronic group. Moreover, the nitrogen atom of the imidazole ring is coordinated with metal ions to form metal-organic frameworks. In recent years, because of imidazole compounds' unique optical properties, their applications have attracted more and more attention in optical analysis. Thus, this review has summarized the synthesis, characterization, and application with emphasis on the research progress of imidazole compounds in optical analysis, including fluorescence probe, colorimetric probe, electrochemiluminescence sensor, fiber optical sensor, surface plasmon resonance, etc. This paper will suggest the direction for the development of imidazole-containing sensors with high sensitivity and selectivity.