Anyone who's ever had an argument over the proper classification of a peanut has probably realized that the difference between a nut and a legume is not always immediately obvious. Both grain legumes and nuts consist of a simple dry fruit carried inside a pod or shell, but upon examining the details, the two groups prove to have significant differences.
In the strict botanical use of the term, a nut will usually have only one seed and at most it will have two. However, legumes frequently contain multiple seeds; it is not uncommon for a pea pod to contain half a dozen peas.
Additionally, a true nut is always indehiscent, meaning it won't open on its own. The majority of legumes are dehiscent, opening naturally along a seam on two sides. Again, the pea pod is an obvious example of this.
The seed of a true nut is never attached to the ovary wall, while legumes often contain seeds attached to their pods.
Looking only at these common distinctions, it is still unclear whether a peanut is a legume or a nut: it contains two seeds, the pod is indehiscent, and the seed is not attached to the ovary wall. These properties guarantee that it is a unique member of whichever family it belongs to but do not exclude it from belonging to either. A pea is a legume, a nut is a nut, and the peanut's identity crisis is readily apparent in its name.
In fact, a peanut is a legume. Technically, legumes are either the plants or the fruits of plants categorized in the fabaceae or leguminosae family--two interchangeable names for the same classification. Among the characteristics already described, this family is known for the high protein yield of its fruits and the capacity for legumes to replenish nitrogen in the soil, making legumes ideal for use in crop rotations.
But before bets are settled, it is important to note that in common parlance, the botanical definition of a nut might carry less weight than its culinary definition. In culinary terms, a nut is any large seed which is used in food and comes from a shell. This group includes drupes, fruits that contain a hard pits, such as almonds and coconuts, seeds which are not nuts, such as cashews and corn nuts, and, of course, the peanut.
Common legumes include: beans, peas, alfalfa, clover, and peanuts.
Common true botanical nuts include: walnuts, pecans, and chestnuts.
*info taken from wisegeek.com