Light

Lighting Mechanics
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 blocks immediately 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.


 * In the current latest version (1.2.0_02), brown mushrooms are bugged and change the tile they are on to level 1 light, regardless of what light the tile is supposed to be.

Blocks that emit light include Fire (15), Jack-O-Lanterns (15), Lava (15), Lightstone(15), Lit furnaces (14), Torches (14), Portals (11), Redstone ore (9) that has been clicked or stepped on, Lit redstone torches (7) and Brown  Mushrooms (1).

Glass does not diminish the light that passes through it, but water or ice reduces light that passes through it by 3.

Light plays an important role in determining the growth of trees and other plants and whether mobs spawn or not.

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.

After the Halloween Update enemy mobs can spawn in higher light levels than 7 depending on the depth above bedrock. For example, Mobs will spawn at level 14 light at depths of 16 and below, which means that torches are useless, and you'll have to fill the entire place with Lava, Fire, Jack-O-Lanterns, Lightstone, or Sunlight to stop mobs from spawning. At level 8 and below, even those won't stop mobs spawning.

The formula for the depth monster spawning is 16 - Layer (calculated from the bedrock) * 1 / 8, rounded down. So, at layer 64 monsters will spawn in level 8 light, and at layer 32 monsters will spawn in level 12 light. Higher layers, like 100, would require level 3 light.



The Nether
The Nether has many interesting light properties.

In the Nether, light decreases by 10% each level, rather than the normal 20%. This means it will never be totally dark in the Nether. Unlike in the normal world where, if there is no source of light, the screen goes nearly pitch black, in the Nether there is a permanent dim ambiance without a source.

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 thus can be used as a light source when lit. Lightstone emits a permanent bright glow and can be reconstructed by crafting nine lightstone dust together, which can be used for lighting. It's very useful underwater because, unlike fire, lava, and torches, water does not affect lightstones. The same applies to Jack-O-Lanterns.