I've heard/read much debate on whether certain plants qualify as kitniyos, such as snow peas and quinoa. What exactly halachically defines "kitniyos?" is it based on what was popular in 13th century Germany, the biological definition of a legume, or something else?
Rabbi Moshe Feinstein writes that if a custom developed about it at whatever point in time, for whatever reason, it's kitniyos; if not, then not.
Regarding peanuts -- he doesn't say that they're not kitniyos because they're too new. He says there were different customs in different places, and where he came from had no custom against them. But if you know your ancestors developed the custom to treat peanuts as kitniyos, then they're treated as such.
Rav Moshe also suggests the possibility that at some point in time, rabbis ceased from adding more plants to the kitniyos list so there would still be enough things left to eat on Pesach!
The word kitnyios means legumes. However, it has come to mean any of a variety of foods from which different groups of Jews abstain on Pesach.
There is no set standard list of what is considered kitnyios, or even a set criteria of why foods might be considered kitnyios.
The gemara Pesachim 35a clearly states that only five foods can possibly become chametz: wheat, barley, oats, spelt, rye. Furthermore, it explicitly rules out rice and millet!
Yet rice, millet, beans, and other starchy, staple foods have been categorized as "kitnyios" by Ashkenazi communities for centuries.
When crops from the New World started to arrive in Europe, the kitnyios question renewed. Corn (maize) became kitnyios because of a linguistic error.
Blessedly, the potato escaped such scrutiny: however, the Chaye Adam wanted to consider potatoes as kitnyios as well
Foods that have only recently hit the Jewish scene, such as quinoa, are not considered kitnyios - although this plant has a slightly grain-like feel to it.
In summary, kitnyios has no specific definition. It is a custom. My personal feeling is, if such an illogical custom were to impinge our eating all year round, we would have done away with it by now. However, since it only applies for seven days (eight in the Diaspora), and it comes at a time of year when we are already significantly alerting our regular food habits, the ban of kitnyios on Pesach is here to stay.
Kashrut.com publishes a list of what is regarded as kitniyot. Also see OU Kitniyot List and What is Kitnityot for a general explanation. Your main question as to the reasoning behind kitniyot is brought up in the Mishna Berurah.
The Mishnah Berurah (453:6 & 464:5) cites three reasons for the minhag (a) kitniyot is harvested and processed in the same manner as chametz, (b) it is ground into flour and baked just like chametz [so people may mistakenly believe that if they can eat kitniyot, they can also eat chametz], ( c ) it may have chametz grains mixed into it [so people who eat kitniyot may inadvertently be eating chametz]. Although initially there were those who objected to the minhag, it has become an accepted part of Pesach in all Ashkenazic communities.
As regards peanuts:
Iggeros Moshe (O.C. III:63) assumes that peanuts are not kitniyot but notes that some have a custom to be machmir.
The Igros Moshe notes that this is a matter of minhag within a community and that as long as something has not previously been considered kitniyot, it will not be added to the list. However, those that have a minhag to treat something as kitniyot should continue to do so (as an example, peanuts).
Iggeros Moshe explains that the minhag to not eat kitniyot developed differently than other minhagim and therefore rules that only foods which we know were specifically included in the minhag are forbidden. [See also Chok Yaakov 453:9 who makes a similar point]. With this he explains the generally accepted custom to not consider potatoes to be kitniyot even though logically they should be, as follows: the minhag of kitniyot can be dated back at least until Maharil, who died in 1427, and potatoes didn’t come to Europe until the 16th century, so potatoes were a “new” vegetable which wasn’t included in the minhag. An important “exception” to the aforementioned rule that “new” vegetables aren’t included in the minhag, is corn/maize which Mishnah Berurah 453:4 and others rule is kitniyot even though it was introduced to Europe after the minhag had already begun.
As a rule, spices are not considered to be kitniyot and Rema 453:1 makes a point of noting that anise/dill and coriander are not kitniyot. Taz 462:3 notes that all spices should be checked before Pesach to establish that no chametz-grains are mixed in, and elsewhere Taz (453:1) specifically notes that anise and coriander seeds should be thoroughly checked. In addition, Taz and Magen Avraham (453:3) discuss whether fennel, cumin and caraway seeds (i.e. three variations of “Kimmel” ) can possibly be checked (and used) for Pesach. Thus, as a rule, spices are not kitniyot but require special care to guarantee that no chametz-grains are mixed into them. Some hashgochos consider fenugreek to be kitniyot while others do not, and the surprising ramifications of this question will be noted towards the end of the article.