Are you familiar with [u]Ohm's Law[/u]? With Ohm's Law, you can calculate the resistance, if you know the current & voltage.
Assuming you are connecting to the output of the Arduino, you've got 5V. The 5V output gets divided between the resistor and the transistor's base-emitter junction. But, with the transistor turned-on, you've got less than 1V across the transistor, so you can just approximate the voltage as 4 or 5V.
Now, you just need to calculate/estimate the required base-current. For that you need to know the output/load current. Then you can just divide by the transitor gain (hfe) to find the needed base-current. As Mark said, in a switching application you need to saturate* the transistor. So, with a typical gain of around 100, your base-current needs to be somewhere around 1/10th to 1/50th of the collector-emitter current, and your circuit should work!
The current through the resistor is the same current into the transistor base. Now that you know the voltage across the resistor and the current throught the resistor, you can use Ohm's Law to calculate the resistance.
- Here's an example of transistor-saturation: You've got an LED & resistor that take 20mA when connected directly to 12V. You connect it through a transistor with a gain of 100.
If you put 1mA into the transistor base with a gain of 100, you should be getting 100mA through the collector-emitter, (and through the LED & resistor). But with 12V, you can only get 20mA (Ohm's law)... The transistor is turned-on all-the-way... It's in saturation, and the current is limited by the other series devices.