In any 'loop' of a circuit, the voltages must balance: the amount generated = the amount used
This "Voltage Loop" law was discovered by a fellow named Kirchhoff (thus it is called Kirchhoff's Voltage Law = KVL). And we can see the loop above, where one part is made of the +9V battery. The other half must use up the +9v (making it -9V so that both halves of the loop equal out).
So what does this have to do with the Forward Voltage of an LED? Well, the Forward Voltage is the 'negative voltage', used by the LED when it's on. Kinda like a 'negative battery'! So lets modify our diagram slightly.
What is interesting about the law we just learned (KVL) is that in no place do we use the resistance of the resistor. It never shows up in the equation. Yet from our previous experiements we know for a fact that changing the resistance affects how bright the LED is. There must be something else going on, lets keep working on understanding the details….
Next we're going to throw in another important law. This one is called Ohm's Law- and it describes how resistors work.
Voltage across a resistor (volts) = Current through the resistor (amperes)* The Resistance of the resistor (ohms)
There's a more common shorthand notation which you'll see very often:
V = I * R
Or the two other ways of writing to solve for current or resistance:
I = V / R
R = V / I
The V is for voltage, the R is for resistance and the I, confusingly, is for current. Yeah, that I is a little annoying isn't it, since theres not even a single I in the word current? Unfortunately, there are 100 years working against us here, so just bear with us on that one.
We'll now combine both KVL and Ohm's Law with our diagram. Our LED is connected to a 1000 ohm resistor (you should verify this by checking the resistor color stripes!), and the voltage across that resistormust be 6.8V (the law of KVL) so the current through that resistor must be 6.8V / 1000ohm = 6.8 mA (Ohm's law).
The amount of current (I) going through an LED is directly proportional to how bright it appears.
Aha! Finally, the last piece of the puzzle. If we increase the current, the LED will be brighter. Likewise, if you decrease the current, the LED will be dimmer. By picking the correct resistor, you have full control over how the LED appears.
Most of the time, you'll want to have a really bright LED so you'll be calculating the smallest resistor you can get away with and not damage the LED. But note that the more current used by the LED, the quicker you'll drain the battery. So there are good reasons for wanting to control the brightness if say you have a small battery and you want the lights to last a long time.
Since as we have seen, too much current will make the LED go poof, what is the best amount of current we should use? For some very big 'power LEDs', the current can be as high as 1 or 2 Amperes, but for pretty much every 3mm, 5mm or 10mm LED, the amount of current you're expected to use is 20mA. You can see this in the datasheet we talked about earlier. See the right-most column? IF is the Forward Current (I) and they use 20mA.