A hydrated 5-azotriazolyl salicylic acid of [(H3ATSA)]⋅2 H2O (1) and its CdII complex of [Cd2(H2ATSA)4]⋅13 H2O (2) have been synthesized and characterized by single-crystal X-ray diffraction analysis and a neutral trans-Z-enol form of H3ATSA and another anionic trans-E-enol H2ATSA− isomer have been found in 1 and 2, respectively. The yellow crystal of 2 can be transformed in situ into red crystals in NaOH solution. The diffuse reflectance and photoluminescent spectra for the crystal powder samples and the aqueous solutions of 1 and 2 have been investigated. The DFT and TDDFT calculations at B3LYP/6–31G* level for 1 and B3LYP/Lanl2dz level for 2 have been used to demonstrate the characteristic absorption spectra and the trans-enol to cis-keto photo- and thermoisomeric reaction for the ATSA3− anion. The onion cell imaging taken by confocal laser scanning microscope was observed with 1 and 2 as fluorescent labels.