Transducing thermodynamic state of water into optical signatures: Applications in synthetic materials and living systems