Control AC 127v with hc-sr04 ultrasonic

Read the sensor, when it is the value you want it to be switch on the relay.

Relays are just like LEDs only you will need a transistor to drive them, see the first diagram in this link:_
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html

Without knowing more about the sensor ( link please ) and the conditions you want to have the pump turned on and off I can't be more specific.