If you are supplying air to a double acting air cylinder or a double acting rotary actuator, then your valve choices to supply them are somewhat limited. You can use two 3/2 valves, a single 4/2 valve, a single 5/2 valve, or a single 5/3 air valve.
Since the purchase of one air valve will cost less than two valves of comparable size, circuit designers typically will opt for a single 5/2 or 4/2 solenoid valve to operate the double acting air actuator, rather than two 3/2 valves which, if plumbed correctly, can emulate the flow paths of a single 5/2 or 4/2 air valve.
The 5/2 valve will have two actuator ports that are plumbed to the air actuator ports. When compressed air is supplied to the 5/2 valve it will pass through the valve. Air will flow to just one of the two actuator ports, however.
The other actuator port will then be open to exhaust, allowing air from one side of the air actuator piston to escape, as a compressed air supply flows into the other actuator port.
When the 5/2 valve is operated, the spool or poppet inside the valve moves. Compressed air is then directed to the other actuator port. The previously charged line is then opened to atmosphere, thus allowing it to become the exhaust line from the actuator and out to atmosphere.
As the valve shifts, the actuator rod is extended or retracted alternatively; hence the term double acting.
The home position for the actuator (whether it's an extended or retracted rod or, if a rotary actuator, rotated in one direction or the other) will be determined by the requirements of the air circuit. The 5/2 valve is plumbed to ensure that air is supplied to the appropriate actuator port to achieve the desired rod position when the air valve is at rest.
The second number is the number of positions the valves internal air paths have. A 5/2 air valve will have five ports and two positions.
Two of these ports are power ports. They allow flow of compressed air to, and alternatively from, the air actuator.
One of the five ports will be the supply port; air from the supply air line to the 5/2 valve.
The other two ports in the 5/2 valve are exhaust ports. This is the difference between a 4/2 and 5/2 valve. A 4/2 air valve has only one exhaust port - the 5/2 valve has two exhaust ports.
Having two exhaust ports allows the installation of two exhaust flow controls for example.
Having two exhaust flow controls means that the air cylinder can be adjusted for one speed to extend the rod and another speed to retract it.
Using a 5/2 valve on a rotary actuator with two exhaust speed controls means that the operator can adjust speed of rotation in one direction and have a different speed for rotation in the other.
If it's your job to select a valve for a double acting cylinder application, picking the 5/2 design over the 4/2 provides some benefits, all other things being equal.
What is a 5/3 air valve? Here is where you find out.