Why do some bicycles have much bigger wheels than most motorcycles?
Gearing is a factor, although by no means the only factor. Common wheel sizes allow for conveniently sized sprockets, both front and rear. The bike industry has always been driven by what racers need, and pro cyclists can reach 100 kph+ on a downhill. The higher a gear you can be in, the less likely you are to "spin out" and no longer be able to pedal effectively. The larger the wheel, the further you move in one revolution. The internal combustion engine can achieve 1000s of RPM, an order of magnitude above what human legs can sustain, which at least in a lab setting start to lose efficiency by around 100 rpm (http://link.springer.com/article/10.1007%2Fs00421-004-1175-5), and above a certain point (which is perhaps the topic of it's own question) are totally unable to keep up with the pedals, let alone apply meaningful power. That's why penny-farthing style bicycles had such big wheels, since the cranks were attached directly to the wheel, the only way to go faster was to get a bigger wheel. 

Chain drive and gearing fixed this issue, allowing for smaller and lighter wheels and a top-tube below crotch height. But there's practical limits to how how large a chainring and how small a rear sprocket you can use. Too large a chainring will start to flex (this was more of an issue before modern materials), and currently the smallest rear sprocket on a standard cassette is 11 teeth, on old 5-speed freewheels it was usually a 14 tooth. A 700c wheel with a 25mm tire can reach ~73kph @ a cadence of 120 rpm with a standard racing 53 tooth chainring and an 11 rear sprocket. To get the same gearing, a 20" BMX wheel would need a 75 tooth chainring that would be roughly 12" in diameter, and a 16 inch folding bicycle wheel would need an 83 tooth, 14" diameter chainring.  As well as flexing, they would need to ensure the bottom bracket was high enough to keep the chainring from brushing the ground when cornering or on rough terrain (curbs, potholes, roots, and the like). 

And some bikes do actually have very small wheels, like folding bikes. But their top speed is limited. Some rear cassettes with 9 tooth smallest sprockets have been made (See http://www.sheldonbrown.com/capreo.html), but engineering concerns make them expensive and prone to wear. And even then, standard 26" and 28" (aka 700C aka 29") wheel sizes were set 100+ years ago, and folding bikes tend to look "goofy" to people compared to more conventional bikes. And the UCI likes mandating that modern racing bikes have roughly the same form as they did in the 70s, including a diamond frame and wheels between 55 and 70 cm. 

Another standard reason given why mountain bikers should favor 29" wheels over 26" inch wheels is that they "roll better". The larger diameter means that it gets stuck less in small ruts and holes, rolling over it rather than down into it. The larger tires also mean a larger volume of air, and thus less need for suspension. Motorcycles are already much heavier (with the requisite power to move much more weight), so beefing up the suspension is less of a problem. The 26" vs 29" (vs 27.5") question is far from settled, but the trend is moving towards bigger wheels, not smaller ones.