Four coordination polymers, namely, [Zn(HL1)(L2)]·HO (1), [Cd(HL1)(L2)]·HO (2), [Zn(L1)(L3)]·HO (3), and [Cd(L1)(L3)] (4) (HL1 = (3,5-dicarboxyl-phenyl)-(4-(2'-carboxyl-phenyl)-benzyl)ether, HL2Cl = 1,1'-bis(4-carboxy-benzyl)-4,4'-bipyridinium dichloride, and L3Cl = 1,1'-dimethyl-4,4'-bipyridylium dichloride), have been synthesized hydrothermally. The structures of compounds 1-4 have been determined by single-crystal X-ray diffraction analyses, and further characterized by elemental analyses, infrared (IR) spectra, powder X-ray diffraction (PXRD) analyses, and thermogravimetric analyses. Compounds 1 and 2 display three-dimensional 2-fold interpenetrating frameworks, whereas compounds 3 and 4 exhibit two-dimensional layer structures. These compounds display photochromic behaviors from pale yellow to green under UV light, visible light, or sunlight. The photochromic mechanisms of these compounds have been studied by IR spectra, PXRD analyses, UV-vis absorption spectra, electron paramagnetic resonance spectra, density functional theory calculations, and X-ray photoelectron spectroscopy. The capabilities of compounds 1 and 2 as inkless and erasable printing media have also been tested. Moreover, the photomodulated fluorescence of these compounds has also been investigated.