Short answer: Don’t waste your time. For mountain bikers, any trail that you might actually want to ride is closed to bikes. And for road bikers, the roads are extremely narrow and winding and for the most part have no shoulder to speak of.
Longer answer: If you do bring your mountain bike, most of what you’ll be riding amounts to dirt service roads and old roads that have fallen into disrepair. Don’t expect any singletrack. There are a couple “officially sanctioned” roads where you can ride, but the longest route (Fountain Freight Road) is only about five miles one way. The others are short, couple mile, in-and-out rides to various geysers or natural features.
If you bring your road bike, be prepared for long distances (25+ miles) in between destinations. Roads are narrow and winding, and bike lanes are nonexistent. Only a few sections have paved shoulders, and the few paved shoulders are also extremely narrow. Road biking in Yellowstone is for the brave only, as you need to be ready for cars, trucks and five-ton rigs passing inches from your elbow.
None of this adds up to a very good experience. It’s a shame the Park Service has not put much effort into making Yellowstone National Park a more bike-friendly place. Cycling would definitely be a unique and exciting way to see the park’s features and could cut down on traffic congestion.