Chazal tell us that for a long time, the only language spoken in the world was Lashon HaKodesh. There is a dispute as to exactly when the different languages came about. Concerning the Posuk towards the end of Parshas Noach which says 'The entire earth had one language with uniform words' (א:אי תיש רב), there is a discussion in the Gemara Yerushalmi, in Megillah (ט `לה א קרפ) between R' Eliezar and R' Yochanan. One says that the people were speaking in seventy languages, and one says that they were speaking in the only language of the world, in Lashon HaKodesh.
The Torah Temimah presents certain problems on this matter. He says that some explanation is needed because one opinion holds that up until the dispersion in Bavel, everyone spoke in Lashon HaKodesh, and afterward, when Hashem mixed their languages, they began to speak in seventy languages. But it seems to be difficult to say that the people would suddenly start to speak in different languages. Furthermore, it is difficult to say that up until that time Lashon HaKodesh was the only language because the Torah explicitly says earlier 'These are the descendants of Cham, according to their families and languages' (כ:י תיש רב), and 'These are the descendants of Shem, according to their families and languages' (אל קוספ םש). We therefore see that there already were set languages for all the nations before this.
The Torah Temimah suggests that the explanation is as follows. In truth, until the generation of the dispersion, even though Lashon HaKodesh was the general language for the whole world, there were also specific languages that were set for each nation. For example, it's possible that in any empire or large country there might be one common language, but each individual nation within it speaks its own language. However, when the people became involved in building the tower and thus needed to understand each other, they then agreed between themselves to speak in Lashon HaKodesh exclusively, since the whole world understood it. When Hashem "mixed up" the languages, He caused them to forget Lashon HaKodesh and each nation returned to talking in its own language. Thus people did not understand each other, and therefore they ceased building that which they had started.
This, concludes the Torah Temimah, is the meaning of the Rabbis comments on our Posuk. One understands that each nation spoke its own language, so there were indeed seventy languages, and one understands that they all agreed upon one language, Lashon HaKodesh. In fact, as we have discussed, both are correct.
Rav Avigdor Miller explains that Hashem's original intention was to bless all of mankind with uniform speech and ideas, making all men one family. After the Flood, there was "a glorious opportunity to establish an ideal society based on recent kinship and common language and attitudes... Unity is the greatest blessing for men of virtue. But this did not continue."
The Midrash Tanchuma expresses a similar idea. It says that the whole idea of an Eiruv in a community is to try to create Shalom between people. This was what Hashem wanted to create by providing all of the world with one language; it would bring them closer. But, unfortunately, because of the wicked people, it could not continue, for they then became united for evil. May we all have the Zechus to unit for only good purposes.