This is actually a really good question. Several large groups of dinosaurs (theropods, most famously) were bipedal, and highly successful at it; while today, very few mammals are bipedal. What was it about dinosaurs that made bipedalism a successful solution, while mammals typically prefer quadrupedalism?
There were two important differences between the immediate ancestors of dinosaurs and of mammals that made bipedalism more likely in the former, and both are related to lizard tails.
The classic lizard shape puts the center of gravity relatively far back: They have smallish heads, their front limbs don't have much musculature, and they tend to have long, heavy tails. So as soon as they start to accelerate -- which moves the center of gravity further back -- they automatically rear up, like a race-car starting up. In fact, as modern lizards run faster and faster, it's not unusual for them to raise up and basically become temporarily bipedal. For example, around the 45-second mark in this YouTube video. For a detailed analysis see Why go bipedal? Locomotion and morphology in Australian agamid lizards.
So as a consequence of basic lizard anatomy, they're prone to become bipedal when they accelerate. This could work out relatively well for lizards, because dinosaur ancestors started off with bigger, more powerful tail muscles that could be coopted into muscles for hind limbs.
Bipedalism, when combined with a caudofemoralis musculature, has cursorial advantages because the caudofemoralis provides a greater source of propulsion to the hindlimbs than is generally available to the forelimbs. That cursorial advantage explains the relative abundance of cursorial facultative bipeds and obligate bipeds among fossil diapsids and the relative scarcity of either among mammals. Having lost their caudofemoralis in the Permian, perhaps in the context of adapting to a fossorial lifestyle, the mammalian line has been disinclined towards bipedalism, but, having never lost the caudofemoralis of their ancestors, cursorial avemetatarsalians (bird-line archosaurs) were naturally inclined towards bipedalism.
--The functional origin of dinosaur bipedalism: Cumulative evidence from bipedally inclined reptiles and disinclined mammals
Another argument that has been made is that bipedalism freed up the forelimbs for other uses, but that last reference pooh-poohs that notion in favor of the better transportation concept - though of course they're not mutually exclusive, early dinosaurs could have mainly gone bipedal for transport but have had some impetus from forelimb use that became less important in later species.