It is interesting to contemplate whether dinosaurs could swim for a few reasons, beyond just common curiosity. As an example, for most of the time the dinosaurs were around, there were no polar ice caps and the ocean levels were much higher than today. Shallow seas and swamps covered much of the land. If dinosaurs couldn't swim, there could be some question regarding how dinosaur species managed to become so wide spread, and how they could adequately get around.
While there is no conclusive proof whether or not dinosaurs were swimmers, we can get some clues by observing animals living today.
It must first be considered that not all dinosaurs were immense creatures. Many were no larger than the lizards of today. This means that the question could be turned around and asked of lizards. Can lizards swim?
The answer is that not only can many lizards of today swim; many are quite proficient at it. For instance, many monitor lizards are adept at swimming and take to the water readily. Some of them have even been found swimming in the ocean, a considerable distance from land. A few lizards like the Galapagos Iguana are even mainly aquatic and often dive in order to feed. They not only swim, they survive by being able to.
What about the lumbering giants, the true thunder beasts? Again, looking at the animals of today, we can see that bulk and weight has very little to do with whether an animal can swim. The blue whale is the largest animal that has ever lived; both in size and in weight, yet it gets along fine in its ocean environment. Its huge bulk wouldn't even be supported on land.
Even ignoring the whales, which were once land mammals, elephants and hippos also swim. Elephants are actually accomplished swimmers. Hippos spend a majority of their time in water, mainly leaving it only at night. Water supports their weight, in both cases. Both of these huge animals love the water.
This is all circumstantial and simply shows that it was possible. After all, we've learned a great deal about dinosaurs by examining the animals living today. Just from this aspect, the possible becomes the probable. Add to that the fact that dinosaur species clearly lived in different areas separated by seas deep enough they could only have made the journey by swimming, and the probability comes closer to certainty.
We don't currently have concrete proof that dinosaurs could swim. Perhaps one day we will have such proof. The data we do have still confirms that it should have been possible for them to swim, and the evidence shows that they most likely did.