Lightsabers are known to come in four colors. There's no functional significance to this; one color is just as effective and deadly as any other, although you might expect otherwise if you remember anything from your advanced chemistry classes. Each color merely serves to denote the rank and/or allegiance of its owner:

It is actually worth noting when a particular Jedi in the "Star Wars" movies switch from one color to another. Luke Skywalker used a blue lightsaber up until Return of the Jedi, when he built his own green one, having graduated in his own mind to the rank of full Jedi; the young Obi-Wan Kenobi used Qui-Gon Jinn's green lightsaber for the first time following his master's death, killing Darth Maul to both symbolically and literally graduate to the rank of Jedi Knight.


Now, it seems the green/blue distinction is not 100% reliable in Attack of the Clones, although the blue-is-Jedi/green-is-not distinction does hold true more often than not. In addition, the non-canonical books and games sometimes suggest or outright state that lightsaber color is entirely an individual choice or a product of the actual crystals used to generate the laser blade--Nekojin tells me that one book character, Corran Horn, actually has a silver lightsaber.

I'd be prepared to accept this, if it weren't for the fact that every "good" Jedi in the movies seems to use carry either a blue or green sword, excepting only Mace Windu. (It's probably worth pointing out that no canonical source of Star Wars information endorses this color-denotes-rank scheme.) So where are all the orange, yellow and pink lightsabers? Too feminine for most Jedi's sense of fashion? (We'll leave the tangential question of why there aren't any female Jedi to another node.)

(Side note: Shro0m informs me that Samuel Jackson specifically requested a purple lightsaber for Mace Windu, so that he could pick himself out in a crowd better. So while not a very "scientific" reason, it certainly explains why his weapon is so special.)