A sprinkler works because the solenoid changes the water pressure inside the sprinkler chamber and lifts the plunger that opens the sprinkler valve. Your sprinkler controller sends an electric current to the solenoid in order to activate it and open the valve and cuts off the current to the solenoid to close the valve. If your solenoid is bad, the water pressure in the sprinkler chamber will not be changed and the valve will fail to open.
Turn off the water supply. Open the bonnet of the sprinkler valve and unscrew the solenoid, taking care that you don't drop the plunger and the spring.
Open the solenoid housing and inspect the plunger. The plunger is a small metal piece with a round rubber base. Rinse it off if there is any dirt or debris. If it is worn or torn, replace it.
Reinsert the solenoid plunger into the housing. Screw the solenoid back into the sprinkler valve.
Turn on the water and test the sprinkler. If it is still not working, replace the solenoid.