Origin of pressure-induced band gap tuning in tin halide perovskites