Any bike will work in a pinch but not all bikes are well suited to daily commuting.
On my commutes I see mostly road bikes, hybrids, city bikes, hipster single speeders, and mountain bikes with street tires. During the winter they almost all have fenders. That describes a pretty broad set of bikes but it also leaves out quite a few types. I seldom see, just for example, dual suspension or knobby-tired mountain bikes, time trial bikes, BMX bikes, track bikes, beach cruisers, touring bikes with full F and R panniers, folding bikes, etc. Not never but seldom.
For me a commuting bike should be comfortable for my body, efficient at my preferred cruising speed, easy to maneuver in traffic, have fenders and lights, not be too valuable or too delicate, tolerant of daily rain, and have gearing suitable for my route. It has to be able to carry my stuff, although nowadays I wear a backpack so that isn't a requirement anymore. It can't require much maintenance.
For me that translates to a road bike or, second best, a rigid mountain bike with road tires. So I commute on an early 80s steel race bike with good fenders, lots of lights including a very bright headlight, 700 x 25 mm tires, not too aggressive a position (drop bars level with saddle), a small Carradice saddlebag (convenient place to toss the U lock and gloves), frame pump, and road gearing (53/39 x 12-26).
Cluttered picture
In a perfect world, this bike might have a wide range IGH and a chaincase, to spare me some maintenance. A generator hub would save me the trouble of recharging batteries. But I don't want to spend the money.
Someone who finds drop bars uncomfortable, needs lower gears for their route, prefers panniers to backpack, or cruises at a different speed, would make a different choice.