protonation and/or deprotonation of amino acid side chains.
The change in pH can affect the ionisation of side chains.
Acidic amino acids have carboxyl side chain and basic amino acids
have amine functional group at its side chain. So the altered pH
(at low pH so many H+ ions and at high pH so many OH-) can interact
with these carboxyl and amine functional group and alters the
ionization of amino acids thus the ionic bonds that help the 3D
shape of the protein get affected. The shape of proteins influence
the function and thus the enzyme become non-functional.