Control 24VAC solenoid with arduino using a octocopuler and a Triac
Change output circuit for inductive load (check the triac datasheet, you have 1 and 2 swapped). See Figure 8 in MOC3012 datasheet. Don't forget to remove R20. 
You might also need a snubber as on Figure 13 in here