The value of the resistor is simple to calculate: subtract the LED's forward voltage from your supply voltage, and this is the voltage that must be across the resistor. Then, use Ohm's lawuse Ohm's law to find the resistance necessaryfind the resistance necessary to get the current desired in the LED.
Any power in the resistor is power not used to make light. So why don't we make the supply voltage very close to the LED voltage, so we don't need a very big resistor, thus reducing our power losses?So why don't we make the supply voltage very close to the LED voltage, so we don't need a very big resistor, thus reducing our power losses? Because if the resistor is too small, it won't regulate the current well, and our circuit will be subject to large variations in current with temperature, manufacturing variation, and supply voltage, just as if we had no resistor at all. As a rule of thumb, at least 25% of the voltage should be dropped over the resistor. Thus, one can never achieve better than 75% efficiency with a series resistor.
You might be wondering if multiple LEDs can be put in parallel, sharing a single current limiting resistor. You can, but the result will not be stable, one LED may hog all the current, and be damaged. See Why exactly can't a single resistor be used for many parallel LEDs?Why exactly can't a single resistor be used for many parallel LEDs?.