How did the genetic code evolve?
This question is closely related, and the fascinating link posted by @JohnSmith is a good read.

In short, with a four-base system, and a codon size of 1, you get four possible amino acids.  Silly system.  A codon size of 2 gives 16.  Not too shabby, but not a lot of room for growth, and not enough for those 20 amino acids.  Codons of size 3 gives 64 - plenty of room to work with and it covers all your forseeable amino acids, and then some, without being too wasteful.

The redundancy, known as degeneracy, is pretty straightforward.  There's room to expand, and any redundancy/degeneracy will only reduce the likelihood of errors.  That's a huge benefit.  For some amino acids, the first two bases are enough.  That third position can be quite tolerant to mutation, which is very beneficial to organisms.  It appears to be even more fine-tuned, to the degree that redundancy often not only reduces the likelihood of mutation but also reduces the damage caused when a base does mutate.  Swapping a hydrophobic AA for another hydrophobic one is less likely to cause aberrant protein function, and anything with a U in the middle is probably hydrophobic.  Convenient!  I'll also note that, while it's not perfect or even a significant correlation, the more popular amino acids tend to get more redundancy; tryptophan is traditionally the least common AA.

Finally, there are a few non-proteinogenic amino acids, so, as the linked question/answer above points out, maybe in the future there will be more amino acids.