Illumination
Each edition of Minecraft has used a different lighting model. Classic's model is simple and only checks whether a block is exposed to the sky. Indev's model was more complex and considered a block's distance from the nearest sunlight and from the nearest light-emitting block. Alpha's model is a refinement of Indev's, calculating sunlight and block-emitted light separately and using a different scale of light intensities.
Classic
In Classic and Survival Test "sunlight" is emitted by the top edge of the map and will hit any block that is under it (and go through any transparent blocks to light blocks underneath). Blocks that did not receive light are in a dim shadow that remains at the same level of brightness no matter how far they were from a light source.
Alpha
For light in Minecraft Alpha, there are 16 degrees of brightness; 15 being as bright as sunlight, 0 being near total darkness. Each block that emits light has its own luminance value. For example, a Torch has a value of 14. After placing a torch, the six blocks around the torch are given a light value of 13. If the neighbouring block already has a greater light value, it is ignored. The process is repeated for each block whose light value just changed - the 13 will spread 12 into neighbouring blocks, and so on. Simply put, light diminishes by one level each block from its source.
During the day, sunlight has a maximum light value of 15. At dusk, it steadily decreases until it reaches a night-time minimum value of 4 representing moonlight. Sunlight is emitted by the top edge of the map, but does not diminish with distance from its "source". A block lit by sunlight will be equally bright at any height or depth.
In Alpha, each "light level" value is 20% less bright than the value above it. Thus, 15 is fully bright and 14 is only 80% bright. 13 is thus 64% bright. This has the effect of making sunlight and firelight seem much brighter than torchlight.
Sunlight in Alpha has its own light array and a behind-the-scenes optimization to make dawn and dusk smoother: the amount of light from the sky is pre-calculated and saved along with the blocks, because it never needs to change except when blocks are added or removed. During dusk, nighttime, and dawn, a "darkness" value is subtracted from the sky to create the effects of different times of day.
Light plays an important role in determining the growth of trees and whether mobs spawn or not. Hostile mobs will spawn at light levels of 7 or below, friendly mobs require a light level of 9 or more to spawn. Trees will only grow when light levels are 13 or higher. Flowers and Saplings will not remain planted in the ground at light levels below 8, though they will survive moonlight (level 4). Snow and ice will melt at light levels 12 and above, and won't form at light levels 10 and 11. Sunlight is an exception to this rule for ice and snow, due to it having its own array.
Blocks that emit light include Torches (14), Fire (15), Lit Furnaces (14), Lava (15), Lightstone(15), Jack-O-Lanterns (15), Brown Mushrooms (1), Redstone ore (9) that has been clicked or stepped on and Redstone torches (7) that are on. The Void also gives off light during day.
Glass does not diminish the light that passes through it, but water or ice reduces light that passes through it by 3.
The Nether
The Nether has many interesting light properties.
Firstly, it is never totally dark in the Nether. Unlike in the normal minecraft universe where if there is no source of light (ie. you shut yourself in a hole with no torches) the screen goes black, in the Nether even when there is a permanent dim ambiance without a source. This continues even if you bring normal blocks to the Nether, therefore it is never pitch black.
Secondly, two (so far) of the new "special blocks" found in the Nether have light-related properties. These two are Bloodstone and Lightstone. Bloodstone burns indefinitely and so can be used as a light source when lit. Lightstone emits a permanent bright glow and can be reconstructed in the normal world (nine lightstone dust crafted together will make one lightstone block) which can be used for lighting, especially underwater because it is immune to water, unlike torches or lava which were the only two sources of constant light before the Halloween Update