and i would still like to learn how to calculate it for other transistors.
Since the TIP120 is a Darlington pair, things are slightly different from a normal transistor, but the concepts are the same.
It starts with the fact that a transistor is a current amplifier. A typical transistor has a current gain (beta or hfe) of around 100, There is a graph on the TIP120 datasheet showing that the minimum current gain is about 500. When current is above 1 Amp, the current remains above 1000. The current gain varies from transistor-to-transistor, so the datasheet usually just specifies the minimum.
If you need 2 Amps (collector-emitter current), you need 2/500 (4 milliamps) base-emitter current.
Since you want to make darn-sure the transistor is switched fully-on, you can put more than that into the base. When we do this we say the transistor is "saturated", and the collector-emitter current is NOT determined by the transistor's gain, but limited by the load resistance (per the voltage and Ohm's Law).
The next thing you need to know is that the voltage applied to the base resistor (typically 5V if you are using an Arduino) is divided between the resistor and the base-emitter junction (Kirchhoff's Law). With a normal ransistor the base-emitter on-voltage is around 0.7V. That means we have 4.3V across the resistor. Since we are usually over-driving and saturating the transistor, we have a little voltage to "play with" and we can usually ignore the 0.7V drop and assume the full 5V is across the resistor.
But, the Darlington has higher base-emitter voltage. The datasheet says 2.5V, so we shouldn't ignore it and we should assume 2.5V across the base resistor.
You also need to know that the current through the base resistor is the same as the base-emitter current (Kirchhoff's Law).
Now that we know the voltage across the resistor and the required current, we can use Ohm's Law to calculate the resistance (V/I = R). (In case you don't know, I is the symbol for current.)
Since we want to saturate the transistor, standard practice is to cut the calculated resistance in half (or more) to at least double the base-emitter current compared to the calculation.
Another thing to know is if you change the load so it requires less current (say 1A or 1/2A instead of 2A), you don't have to change the base resistor... The transistor will remain saturated. But if change it to where you need more current, you may not have enough base-current to drive the transistor into saturation, and you may need to re-calculate.