Longneck racism might stem from their size. Longnecks are the biggest dinosaurs, and the biggest animals, on land. They are far taller than any of the other dinosaurs. It's probably hard for them not to look down on other dinosaurs, perhaps even see them as insignificant. But they appear to be the "less aggressive" type. I don't really see them speaking out against other species, or try to promote their sense of superioty. I recall how Littlefoot's mother, though obviously a bit racist, saved Cera's life even though she was a threehorn.
Threehorn racism, however, probably comes from their need of confidence. They live in herds, and the leaders are in a constant threat of being overthrown by a younger threehorn. They must remain confident, for if they show doubt, they could lose the fight, and possibly be driven out of the herd, or become so badly injured they become prey to a sharptooth. This confidence could lead to overconfidence, which could lead the threehorns to think they are superior to all dinosaurs. Threehorns seem to be more vocal about this than longnecks, as seen with Mr. Threehorn and definitely Cera in the first movie.
Racism is probably present in all species of dinosaurs, but the most obvious displays of racism are, indeed, from Mr. Threehorn himself.
And like you said, Pterano also displayed racism as well, believing that flyers are superior and how he should have been leader. This sense of superiority probably stems from the fact that he could fly and could travel faster than the other dinosaurs. However, Pterano did not treat Littlefoot and his friends like he felt they were inferior, and he was genuinely concerned for Ducky.
Ducky's mother's lack of racism is, as you said, probably the most notable in the series. I usually don't see racism performed by Swimmers, though there might have been some that I missed. One idea that might explain this is that Swimmers are more devoted to their offspring than other dinosaurs. In real life, Longnecks abandon their young after the eggs are laid. Threehorns may have taken care of their young, but probably not as devotedly as Swimmers. The Maiasaura, for example, is believed to have fed her offspring regurgitated food. In Magic School Bus, the Maiasaura even tried to feed the kids, thinking they were hungry. However, whether or not the real Maiasaura would try to feed a baby of a different species is unknown.
Also, if I recall correctly, the dinosaur chart indicates that Swimmers were the most intelligent of the plant-eating dinosaurs. They were probably smart enough to know that racism would not do them much favors, or they felt racism was a waste of time and ignored it.
But now that I think of it, I think there was at least one example of Swimmer racism in LBT. That one book, Friends in Need wasn't it? I think that had racist Swimmers in it. I can't remember.
There is definite racism among leaf-eating dinosaurs when it comes to sharpteeth. It would appear that leaf-eater children are taught not only to fear sharpteeth, but taught that sharpteeth are stupid and easily outwitted. I don't know if sharpteeth share the same racist against leaf-eaters. It would make sense, since sharpteeth probably see leaf-eaters as nothing more than food for them to eat.
Sharpteeth definitely have a bad rap among the leaf-eating dinosaurs. While the plant-eating dinosaurs understand what sharpteeth can do, they often feel that sharpteeth are all brute and no brains. However, sharpteeth are definitely not as stupid as leaf-eaters claim they are. One example is the relationship between Redclaw and the Fast Biters. They are a pack, and a pack can only be maintained with understanding, thinking. The Fast Biters seem to have accepted Redclaw as leader, and will do what he says. Redclaw often gives orders to the Fast Biters, another example of intelligence.
Racism is not limited to leaf-eaters, as sharpteeth seem to have a sense of racism as well. This we see very well in The Lonely Journey, when Chomper is constantly attacked by any sharptooth he encounters. Though these attacks may stem from more than just racism. Chomper was another sharptooth and posed a threat to the sharpteeth because it would mean another mouth to feed. So instead of just allowing Chomper to hunt down what little prey there was in the area, they decide to try to kill him instead.
This is not unusual behavior. We see this same kind of behavior in some carnivores. Wolves who stray into another pack's territory are killed if they don't get out of the pack's territory. A cheetah who ends up in another cheetah's turf is attacked. Invading tigers are often killed by another tiger with a bite to the neck. Lions will kill cheetahs if given the chance if they come across them. So it would only be natural for sharpteeth to behave in the same way.