I tend to have them appear relatively randomly here and there, especially in remote, isolated areas like moors and uninhabited prairies. And jungles of course!
But talking about dinosaurs and D&D will always remind me of one of the most memorable encounters in the long-running 2e D&D campaign I was a part of in college. I had made up this huge random encounter table for the DM to use, and it did have dinosaurs in it for various biomes. Once, when we were going across a grassland to our next destination, we were attacked by a gorgosaurus, which somehow managed to get surprise on us, despite the DM having previously mentioned that we were in a "flat, treeless plain". After a bit of good-natured complaining about how a 30-foot-tall dinosaur could sneak up on us (and, to be fair, we were camped and it was dark out), we continued on with the encounter, which was actually rather tough for our level. After defeating it, the DM asked "OK, so what happened to your horses?" Someone said that we must have tied them to a tree, but the DM immediately countered with "flat, treeless plain", to which we had no answer to. Then suddenly, someone remembered that we were hauling around a statue of a petrified character who had stupidly charged towards a basilisk in the previous session (when the rest of the party was trying to prudently stay away from it, since, on our flat, treeless plain, we had spotted it from a distance), and he said "Oh, we tied them to the statue!" The DM (an engineering student) then proceeded to calculate exactly what forces would be exerted by a half-dozen panicked horses on a statue. I remember him saying "Oooooh, I'm gettng some nasty vectors here!" Needless to say, the petrified character was now in several pieces, and the player was not happy about it. Given that he was a "problem" player (see charging a basilisk above, which was merely the latest in a long line of anti-collaborative actions), few tears were shed when he left the game shortly afterwards.