The important parameter for an LED is current. The resistor is chosen to set that current. Here's an example calculation for a 5V supply.
V = voltage across the resistor = 5V - 1.2V(the voltage across the LED) = 3.8V. Now V=IR so R=V/I. I = 29mA = 0.029A. So R = 3.8V/0.029A = 131 ohms. Nearest standard size is 130 ohm. The required resistor power P = I^2*R = 0.029*0.029*130 = 0.109 Watt, so a 1/8 watt resistor would be OK.
You can see from this formula that using a 1.2V supply without some kind of constant current source would be problematic. You can't just hook up a 1.2V LED to a 1.2V battery without some current limiting resistor; it could fry.