UV-light-assisted functionalization for sensing of light molecules