From what I gather, D2 and D3 are both converted into the same chemical, but D3 has a longer half-life than D2. In large single-doses, D2 (ergocalciferol) doesn't hang around as long as D3 (cholecalciferol -- vitamin D3 is made from cholesterol -- http://www.cholesterol-and-health.com/Vitamin-D.html), but if you are taking a daily dose, they are equally effective:
(This is an article by Jack Norris -- I like him because he always cites his sources.)
A bottle of kidney beans is no substitution for a bottle of vitamins.
This is a very long paper that says D3 is still more effective and potent and discusses a wide variety of reasons (although it seems to indicate in some cases they are equally effective):
The biggest problem is that more and more people lead predominantly indoor lifestyles and don't make enough of their own D3 from the sun -- without supplementation, it is incredibly difficult to get enough vitamin D from diet alone (whether from fortified foods or non-vegan sources http://www.webmd.com/food-recipes/tc/getting-enough-vitamin-d-topic-overview).
The second biggest problem (which is not applicable to people in more equatorial regions) is that it is incredibly difficult (and in some regions impossible) to get enough UVB exposure in the winter -- from what I gather, once you are further north (south for our antipodean* friends) than a certain latitude, the sun's rays are coming in at too low an angle (http://www.ncbi.nlm.nih.gov/pubmed/2839537).
* And everyone else in the southern hemisphere...
Some people say it kind of sucks having to rely on supplements to get enough vitamin D, and I see where they're coming from. However, I think it's pretty cool that we are advanced enough to have supplements and are able to lead predominantly indoor lives without compromising our health. (I still try to spend time outdoors in the summer, though!) :D
Any questions? Did I miss out on an important citation? Let me know!
P.S. I know there are a lot of wikipedia skeptics out there, but wiki has a great article on vitamin D (full of citations) that has a great section of the health benefits of vitamin D -- it boosts your immune system and can help reduce the risk of cancer. http://en.wikipedia.org/wiki/Vitamin_D