Let's consider a mountain bike and a motorcycle. Each one has a need to be as usable as possible and overcome obstacles more effectively. Larger wheels usually mean greater cross-country ability. So what is the theory behind bicycles usually having bigger wheels than motorbikes?
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.
I don't think "much bigger" is an appropriate description:
At most, bike wheels tend to be "slightly bigger".
And it should be noted that in both cases one limiting factor is "standover height" -- the lowest position of the rider (for a relatively straight-forward frame style) is basically limited by the wheel size. Larger wheels either require longer legs on the rider, oddball frame designs (which make the bike longer and more unwieldy), or "penny farthing" style mounting/dismounting.
Summary: motorbikes have heavier wheels, making them smaller makes them more maneuverable. Motorbikes go faster, so air resistance is more important and bigger wheels have more of it. Motorbikes have much more power available, and go faster, so suspension is both easier to carry and more necessary.
There are more considerations than just bumps, though. Yes, bigger wheels handle bumps better than small ones. If you only care about that the wheel size will be limited only by the wheels you can buy - this is why the 36"/ISO787 wheel size is popular in some quarters. You can get bigger wheels, but tyres become very hard to find and will likely have to make tyres, tubes and rims yourself.
Bigger wheels are weaker for the same weight, and weight matters a lot for a bicycle. Effectively you're spreading the same amount of material out over a bigger rim and tyres, so everything gets thinner. At the same time, since bicycles at least have a fairly restricted hub width, the wheel gets weaker laterally because the angle between left and right spokes gets smaller at the same time as the lever arm gets bigger.
Bigger wheels have more air resistance because they have more frontal area. Sure, you can work on that, but anything you can do to reduce the air resistance of a bit wheel you can also do to a small wheel... and if you look at the Battle Mountain bikes, they use the same techniques as the UCI bikes on their small wheels.
For example, the bicycle world speed record set by a Moulton small-wheel bike:
In 1986 Jim Glover rode this bicycle at 51mph on a flying 200 metre course to set a world speed record that stands to this day.
So why do bicycles have bigger wheels?
As you said, bigger wheels handle bumps better. This is especially true when there's little or no suspension (road bikes), but also applies to mountain bikes. A bigger wheel doesn't drop into dips as far, so you lose less energy to the suspension.
Motorbikes go faster than bicycles, and have higher top speeds. A whole lot of things follow from that.
That means motorbikes must have suspension, where it's optional for bicycles. If a motorbike hits a bump and gets airborne, that's exciting and unusual. But even a lot of bicycle riders are unaware that their bike wheels come off the ground, because that's just part of riding your bike (you "unweight the saddle" the bike on bumps and use your body as part of the suspension). But as soon as you have suspension, the bump advantage of bigger wheels largely goes away.
The flip side of "bigger wheels are weaker" is that motorbikes put a lot more stress on wheels. They're heavier, more power, and go faster. They also travel longer distances - a 1000km bicycle ride is a long way and takes days, but on a motorbike it's not remarkable unless there are exceptional factors. Lots and lots of motorbike riders travel more than, say, 50,000km a year by motorbike but hardly any bicycle riders do the same. So a motorbike has to last longer than a bicycle which makes strength more important. Failures are also more dangerous at higher speeds, and with a heavier motorbike that can fall on the rider in a crash. Again, stronger is important and small wheels are stronger.
Bigger tyres have more rubber, so they last longer. Bicycle tyres have to be thin so they flex, which means the motorbike solution of making tyres thicker to get longer life really doesn't work. That makes a bigger wheel one of the few options.
Ride comfort and efficiency on rough surfaces both play a part. A larger wheel helps both of these - smoothing out bumps for comfort, and reducing vertical motion (wasted energy).
Small wheel bicycles such as folding bikes are tolerable on smooth surfaces, but aren't famed for off-road ability, comfort or speed.
The extreme in large wheels was the Ordinary bicycle, (aka penny farthing) which provided appropriate "gearing" with a direct drive wheel - but it also provided comfort and efficiency (not so much safety!) on the unmade roads of the era.
When gearing became practical and accepted, wheel sizes diminished for convenience and safety - indeed, geared bicycles were known as "Safety" as opposed to "Ordinary" bicycles - but only so far, thanks to the need for comfort and efficiency on rough roads.
Motorbikes don't have the same need for efficiency, as they have a bit more than 1/4 horsepower to play with, so they can use more sophisticated suspension, and much softer and fatter tyres, to win out on the comfort front even with smaller wheels.
The fatter tyres are also important for better roadholding at speeds that cyclists don't normally experience.
So both forms of transport seem to have settled on the size of wheel that best meets their conditions.
Previous answers address different gear ratios, different durability and different comfort. There are other reasons too.
tl;dr Bicycle is more limitted by cadence; motorbike is limitted by material ultimate tensile strength.
Morotbike engines can run 12,000 RPM with relatively small torque on crankshaft. Man can do 100 RPM with relatively high torque. In the motorbike there are gears, gearbox and chain gear (cardan gear) between engine and the wheel. All the gears reduce the angular speed (part RPMs) but increase the torque. The gears between man's leg and the wheel increase the speed and reduce the torque.
For Yamaha YZF-R1 (2003) the gear ratio (crank/axle) varies from 10.6:1 to 4.7:1. For the first gear; that means, the wheel is doing 10 times lower RMPs than the engine does and the torque is 10 times higher on the wheel axle than on the crankshaft.
For bicycle with 11 - 25 casette and 26 - 48 chainwheel the gear ratios (foot/axle) are ranging from 0.96:1 (1:1.04) to 0.22:1 (1:4.36).
Suppose the torque is measured at the axle (divide the force by the wheel circumference only) and top gear. Max torque of that Yamaha is approximately 100 Nm at axle, which gives 21.28 Nm at the crankshaft and 225.57 Nm at axle with 1st gear applied. 80kg man can generate 140 Nm at the chainwheel and 30.8 - 134.4 Nm at the axle.
If we wanted to use motorbike wheel size (190/55 R17, 2013 mm), which is 1.05 times smaller than the bicycle one (700x38C, 2117 mm), we would need to decrease the gear ratio leading to man-geanerated torque ranging from 29.3 - 127.8 Nm.
If we want to use bicycle wheel size, we would need to increase the gear ratio resulting in engine-generated torque ranging from 105.2 to 237.2 Nm.
In biker-bicycle system the biker is the heavy part. In biker-motorcycle system the bike is usually heavier, sometimes the bikers weight is almost negligible. Bigger wheel means bigger momentum and bigger gyroscopic effect. For bicycles it means better stability; you are less vulnereable to fall or wild turns. For motorbikes it leads to higher resistance to turning and overal worse maneuverability.
- Surface sensitivity
tl;dr Smaller wheels are more vulnereable to get stuck than the bigger wheels.
This was already mentioned, but I will expand it more. Smaller wheels can be stuck in a hole much easier than the bigger ones. It's like putting big coin into hole for the smaller one.
When the smaller wheel comes to a bump it has larger angle of attach than the bigger wheel. The smaller wheel will tend to stop on that bump, but the larger wheel will tend to overpass it. As an exteme example compare roller-skater and biker on a gravel pavement.
The smaller wheels also tend more to stuck in soft surfaces (mud, sand,snow) that the bigger ones. For the same penetration depth, the bigger wheel have more material involved, thus dissipating the load to larger area and also having better angle of attack htan the smaller wheel. The bigger wheels also have the chain further from the debris.
Motorbikes are heavier and have much more power/torque than cyclists. When stuck, motorbike has advantage in lower centre of mass (less vulnereable to spin around front wheel), higher momentum (it will plow through the mud) and power (it will dig up). Motorbikes are much more specialized - one almost cannot use road bike offroad and vice versa. On the other hand bicycles can run quite comfortably on the road and in rough terrain.