The easiest wayFirst you'll need to do thisfind out / calculate / measure how much current the solenoid requires, and what voltage it requires. If the voltage is less than 50v (quite likely) and the current is less than 500mA, then you can drive it with a single outputof the good old ULN2803.
Here it is driving a bunch of solenoids. You can do up to 8. The best thing is that it already includes the flyback diode that you'll always need when you're switching inductive loads like this.
If you need more current, then you can use several outputs in parallel, up to a maximum of 2.5A.