Towards the end of Parshas Noach we read the famous story of the Tower of Babel (Genesis 11:1-9):
The whole earth was of one language and of unified terms. When they journeyed from the east, they found a plain in the land of Shinar; and they settled there. And they said, a man to his fellow, "Come, let us make bricks, and fire them," and they had brick for stone, and asphalt for mortar. And they said, "Come, let us build us a city, and a tower with its top in the sky, and let us make for ourselves a name; lest we be scattered abroad upon the face of the whole earth."
And God descended to see the city and the tower which the children of men had built. And God said, "Behold, they are one people with one language for all of them, and this is what they begin to do! And now nothing that they plan to do will be withheld from them! Come, let us go down and confuse their language, so that a man will not understand the language of his fellow." And God scattered them from there over the face of all the earth, and they stopped building the city. Therefore it was called by the name Babel, for there God confused the language of all the earth, and from there God scattered them upon the face of all the earth.
The story of the Dor Haflaga - the Generation of the Dispersal - is one of the most enigmatic narratives in the Torah. Humanity joins together in a great project, to build a great city and tower, that would enable them to live together in unity. This would seem to be a good thing, certainly not a sin! Yet, while the Torah never actually accuses them of committing a sin, or even of doing anything improper, God clearly disapproved of this plan and instead caused humanity to be scattered over the entire earth.
The commentaries struggle a great deal to explain what the Torah is telling us in this story. There are many midrashim that tell us that the builders of the Tower were engaged, in some sense, in a rebellion against God; that they intended to ascend to the Heavens and wage war against God (an utter absurdity, if understood literally). Others say that the Tower was intended for idolatry, or to somehow prevent another flood. However, in the final analysis, the Torah does not mention any of these concerns, and instead focuses only on the fact that the entire human race was unified. The Torah is clearly indicating that, whatever other issues may have been going on, the critical problem was the fact that they were unified. And, in the end, they were not really punished, but simply dispersed over the face of the earth. Thus, the problem was unity and the solution was dispersal.
How are we to understand this? Aren't peace and unity among the most basic values taught by Judaism? The unity of the human race should have been a good thing; one that we should try to emulate! Indeed, the Ibn Ezra writes that even the most righteous men of that generation - Noah, his son Shem, and even Abraham himself - were among the builders of the Tower of Babel! Clearly, then, the intent of the builders of the Tower was not wicked. So what did they do wrong?
R' Naftali Tzvi Yehuda Berlin
Firstly, because God's intent is that mankind should spread out over the entire earth, as God instructed Noah (Genesis 9:7), "And you, be fruitful and multiply; swarm in the earth, and multiply therein."
Secondly, and more significantly, the goal of the Dor Haflaga was not only to keep mankind united geographically, but also to keep them united ideologically, that they should have a unified culture and philosophy. The function of the Tower was to enable the people to supervise the surrounding regions, in case any group attempted to break away from the community and go off on their own. God, however, does not intend mankind to have a single monolithic culture. Rather, God's intent is for humanity to be diverse, with many different cultures and opinions and ways of life.
While the people of that generation may have had good intentions, they made the same error that has been made by innumerable intelligent people throughout history. They sought to create a utopia - an ideal society. And like every other utopia that has ever been proposed, their perfect society had one critical flaw: the repression of diversity. Every utopia requires a system - ultimately, a totalitarian system - that ensures conformity to the standards of the society. Once true diversity is allowed in, once people are allowed to make independent choices about how to live their lives, the utopia will quickly lose its utopian qualities.
We see here that diversity is a good thing, and that mankind is supposed to have many different kinds of people and cultures. This is true not only on a global scale, but even within the Jewish people themselves, in the twelve tribes of the children of Israel, each of which had its own unique culture and way of life.
Of course, there are limits to diversity. There are moral principles that God has imposed on all mankind, and even more so on the Jewish people. These cannot be set aside for the sake of diversity. However, within the parameters of the laws and teachings of the Torah, there remains a great deal of room for diversity. Indeed, the Chozeh M'Lublin (R' Yakov Yitzchak Horowitz, d.1815) commented on the famous passage from the Talmud (Makkos 3:16), "God wanted to give merit to Israel, therefore He increased for them Torah and mitzvos," that the abundance of mitzvos is intended to enable each individual to serve God in his own unique fashion.
It goes without saying that peace and unity are extraordinarily important values, but they are not absolute values. Tolerance of diversity is an intrinsic aspect of genuine peace and unity and a peace and unity that is built upon conformity for its own sake has no value whatsoever. True peace and unity must be built upon a foundation of truth and the recognition of shared core values that are far more important than any superficial conformity. Indeed, such a unity of mankind is the ultimate goal of history. As God described the messianic age to the prophet Zephaniah (3:9), "For then I will change the peoples to a pure language, so that they will all call in the name of God, to serve Him in unity."
 Ibn Ezra (Genesis 11:1) states: ...היה אברהם מבוני המגדל, ואל תתמה, כי נח ושם היו שם. The Seder HaDoros (א' תתקע"ד) cites this opinion as well, נח ואברם ושם עזרו בבנין המגדל. Rav Miller similarly cites the Ralbag as saying that Noah and Shem were among the builders, but I was not able to find this in the Ralbag.
 ביאורי חסידות לש"ס from R' Y.Y. Chasida on Makkos 23b from Sefer Zichron Zos - Vayakhel.