Using the Arduino to control the solenoid valve is simply a case of setting a pin high for the appropriate amount of time. There is, however, a caveat, the solenoid works at a different voltage to the Arduino and you cannot directly connect the two. In this case a TIP120 transistor is used as a bridge.
The TIP120 allows a small dc voltage (from the Arduino) to switch a larger dc voltage (12V to the solenoid). It can be thought of as a switch, applying a current to B allows current to flow between C to E.