There are at least two functions for the human appendix that have been theorized: a reservoir for 'good' bacteria to repopulate the gut after a severe GI infection; as a digestive organ in more primative mammals.
It also has significant immune functions particularly B-lymphocyte-mediated immune responses and extrathymically derived T-lymphocytes.
http://www.ncbi.nlm.nih.gov/pubmed/15228837ScienceDaily (Aug. 21, 2009) — The lowly appendix, long-regarded as a useless evolutionary artifact, won newfound respect two years ago when researchers at Duke University Medical Center proposed that it actually serves a critical function. The appendix, they said, is a safe haven where good bacteria could hang out until they were needed to repopulate the gut after a nasty case of diarrhea, for example.
Using a modern approach to evolutionary biology called cladistics, which utilizes genetic information in combination with a variety of other data to evaluate biological relationships that emerge over the ages, Parker and colleagues found that the appendix has evolved at least twice, once among Australian marsupials and another time among rats, lemmings and other rodents, selected primates and humans. "We also figure that the appendix has been around for at least 80 million years, much longer than we would estimate if Darwin's ideas about the appendix were correct."
Darwin theorized that the appendix in humans and other primates was the evolutionary remains of a larger structure, called a cecum, which was used by now- extinct ancestors for digesting food. The latest study demonstrates two major problems with that idea. First, several living species, including certain lemurs, several rodents and a type of flying squirrel, still have an appendix attached to a large cecum which is used in digestion. Second, Parker says the appendix is actually quite widespread in nature. "For example, when species are divided into groups called 'families', we find that more than 70 percent of all primate and rodent groups contain species with an appendix." Darwin had thought that appendices appeared in only a small handful of animals.
http://www.sciencedaily.com/releases/2009/08/090820175901.htm">Evolution Of The Human Appendix: A Biological 'Remnant' No More