Binding to hydrogen peroxide (H2O2) and eliciting a change in the protein's activity in response to the intracellular level of that small molecule.