Hydrogels with photo-responsive mechanical properties have found broad biomedical applications, including delivering bioactive molecules, cell culture, biosensing, and tissue engineering. Here, using a photocleavable protein, PhoCl, as the crosslinker we engineer two types of poly(ethylene glycol) hydrogels whose mechanical stability can be weakened or strengthened, respectively, upon visible light illumination. In the photo weakening hydrogels, photocleavage leads to rupture of the protein crosslinkers, and decrease of the mechanical properties of the hydrogels. In contrast, in the photo strengthening hydrogels, by properly choosing the crosslinking positions, photocleavage does not rupture the crosslinking sites but exposes additional cryptical reactive cysteine residues. When reacting with extra maleimide groups in the hydrogel network, the mechanical properties of the hydrogels can be enhanced upon light illumination. Our study indicates that photocleavable proteins could provide more designing possibilities than the small-molecule counterparts. A proof-of-principle demonstration of spatially controlling the mechanical properties of hydrogels was also provided.