Application of Optical Hydrogels in Environmental Sensing