Control current from Arduino
When you say transistor here, I'm assuming you mean a bipolar junction transistor, or BJT.

So, the main concern here is that you could end up driving too much current through your Arduino's GPIO pin. If your coil uses 2.25 A, your Arduino will need to source (if you use an npn transistor, which I recommend) or sink (pnp transistor, not recommended)

$$\frac{2.25}{β}~\textrm A$$

Since the Arduino is only rated for 40 mA sink or source per pin, you will need a transistor with a β of at least

$$\frac{2.25~\textrm A}{40~\textrm{mA}}=56.25$$

This is not difficult; most small-signal transistors have β > 100. However, you will need to find one rated for collector current at least 2.25 A, preferably 3 A or higher, which is substantially higher than your standard 2N3904 or 2N2222 can handle.

And at this point, I realize that you didn't specify a working voltage. Your transistor will also need to be able to withstand a collector-emitter voltage of your full coil supply voltage when it's off; its VCE(max) rating needs to be at least your supply voltage. Unless you're working at high voltages, though, a TIP120 NPN Darlington transistor (with VCE(max) of 60 V) should work fine.



Now, the first alternative that might be worth considering is using a MOSFET instead, if you're concerned about your Arduino pin currents. A MOSFET only requires a current when it's switching, and in the steady state there is no gate current. In this case, you can simply drive the gate directly from the Arduino (through a resistor to limit charging current), if you find a MOSFET that has an acceptable RDS(on) at VGS = 5V (your Arduino's output voltage, unless you're using one of the 3.3V Arduinos). I would recommend the IRL640A for 5V purposes. If you need 3.3V, that will likely be hard to find, as that's below the threshold voltage of many FETs.



So, in conclusion, using an optoisolator is probably more trouble than necessary. I would only suggest using one if you had some reason to want to isolate your control circuitry, for example, if your coil is operating at hundreds of volts and could destroy low-voltage control circuitry easily.

Lastly, don't forget the flyback diode on that coil!



EDIT: Since you asked, here's the proper way to connect the two types of transistor:







simulate this circuit &ndash; Schematic created using CircuitLab

R3 in the schematic is there to pull the gate low if the Arduino GPIO pin is left floating (Hi-Z, high-impedance, or a number of other terms) or just plain not connected. Without it, it would be possible for the transistor to be turned on and off by static electricity; this keeps it off when the Arduino isn't actively driving it on.

The diodes are very necessary, by the way. Those are the flyback diodes I said not to forget, and I mention them again because without those diodes your transistors will break when you turn the coil off.

The 150Ω resistors are calculated to make sure less than 40mA flows out of or into the Arduino pin at all times. Technically, you could probably go with a smaller resistance for the MOSFET, as the current will only be momentary and the Arduino can probably handle an overcurrent for a few nanoseconds; you should be fine to use a 100Ω resistor if you don't have 150Ω ones. Do use a 150Ω one for the BJT circuit though. And go higher rather than lower if you don't have that; a 220Ω resistor should also work fine.