Can you explain what you have.
There is a mechanical valve ?
And you want to control it with a servo ?
Can you use an electrial valve, and control that with the Arduino ?
Do you have the servo connected ?
You need the Servo library. In the Arduino, import the Servo library.http://arduino.cc/it/Reference/Servo
Can you make the servo to rotate to a certain position ?
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
myservo.attach(9); // attaches the servo on pin 9 to the servo object
if (....) // for example check a button.
myservo.write(0); // for example position 0 for valve 'on'
myservo.write(180); // for example position 180 for valve 'off'
Please do reply to this post, so I know that you have read it.