LEDs have two properties that you care about:
1. forward voltage drop - how much voltage has to go across the led to light up
2. maximum current - how much current the LED can handle.
The forward voltage drop varies depending on the chemicals/materials used inside the LED but typically, they're the values h1386343 listed in the post above (Except maybe blue which seems a bit too much, should be about 3-3.3v imho). If the LED doesn't get this much voltage, it may not light up.
The maximum current is exactly that, the maximum the LED can tolerate. If you give it more current than the value the datasheet says the LED can handle, the LED may destroy itself or it may become so bright the color changes (for example red becomes orange).
Even though a datasheet may say the LED supports up to - for example - 20 mA, it doesn't mean you should configure the circuit to give it 20mA. 20 mA for that LED may be super bright. You might find 10mA is easier on the eyes and bright enough for your needs.
You have the simple formula:
Voltage = Current x Resistance
Voltage is the voltage you supply to the circuit, from which you take out the forward voltage of the LED.
Current is how much current you want to allow through the LED in Amperes : 1A = 1000 mA so 10 mA = 0.01A , 100mA = 0.1A etc
So if your input voltage is 5v and you want to use a LED with a forward voltage of 2.2v at a maximum of 10 mA, then your formula becomes :
5v - 2.2v = 0.01 x R
so R becomes (5-2.2) / 0.01 = 280 ohms.
This 280 ohms is not a standard value, so you can use 270 ohms or 300 ohms, which are easy to find. A lower resistor value means a bit more current is allowed through led, a higher value means less current is allowed.
If you want to chain several leds, you just take out the forward voltages from the input voltage. With several leds however, the current remains the same, so for example if you have 5 leds you want to use 10mA each, you need to use 50mA in your formula.
ps. You might also be interested in knowing how big of a resistor you need to use.
The power dissipated in a resistor by limiting the current is determined with the formula P = I x I x R
So if we go with the example above where we go with a 270 ohm resistor and 10mA goes through it, then the power will be 0.01 x 0.01 x 270 = 0.027 watts , which means a 0.125w resistor (1/8w) is more than enough (for this.