Light--responsive hydrogel valves with enhanced response characteristics compatible with microfluidics have been obtained by optimization of molecular design of spiropyran photoswitches and gel composition. Self--protonating gel formulations were exploited, wherein acrylic acid was copolymerized in the hydrogel network as an internal proton do--nor, to achieve a swollen state of the hydrogel in water at neutral pH. Light--responsive properties were endowed upon the hydrogels by copolymerization of spiropyran chromophores, using electron withdrawing and donating groups to tune the gel--swelling rate. Faster macroscopic swelling of the hydrogels was obtained by changing an ester to an ether at the 6' position (factor of 4) or shifting the ether group to the 8' position of the spiropyran (factor of 2.5) producing a 10 fold increase in total. The effect was also visible in the swelling behavior of the corresponding hydrogel valves, where the ob--served macroscopic changes were reversible and reproducible and in agreement with the molecular kinetics. Gel--valves integrated within microfluidic channels have been fabricated and allow reversible and repeatable operation, with opening of the valve effected in 1 minute, while closing takes around 5.5 minutes.