Shortly after humanity is saved from the terrible flood – almost immediately after, as the Ramban points out following Midrash Rabba – mankind finds a new and terrible way to rebel against its Creator.
The Ramban acknowledges the temptation to see in the text nothing worse than wanting to act together, but he insists that there is something more nefarious afoot. He seizes upon the statement “We will make for ourselves a Name” (Bereishit 11:4), explaining their crime by means of a series of allusions and outside references. He doesn’t want to make things too explicit, but he wants it to be understood that these people were clearly up to no good. Anybody who understands the meaning of a name can see that somebody who builds a tower for the purpose of making one is not acting in good faith.
In the event, the punishment of scattering them and confusing their languages was, in fact, a punishment befitting the crime, as will become clear to those who can understand the nature of the crime. The Ramban asserts that their attempt to make a name was analogous to the terrible spiritual rupture of Acher, Elisha ben Abuye, who upon viewing the heavenly realm sought to “uproot what was planted” (Chagiga 14b). This expression in medieval mysticism commonly refers to heresy and rebellion against the Divine Order of Creation. The Ramban cites the Zohar here in Noach (75a) to express the idea (necessarily paraphrased) that these people understood the Name of G-d to be all-powerful in heaven, so they wished to have their own name on earth, where they could be sovereign and independent of His rule. (All of this from “Name!”)
The Ramban points out, in the name of R’ Berachya (Bereishit Rabba 38:12), that this just goes to show that human beings are rebellious by nature. Just as Adam violated the one commandment he was given as soon as he was placed in the Garden, so the offspring of Noach set about doing the worst possible thing as soon as they got together and built their first city.
Finally, speaking of names, the Ramban points out that the name attributed to the Creator is different as He dispenses with the malefactors in the flood and at the Tower of Babel. The flood, the Torah tells us, was brought by “Elokim,” associated with the attribute of justice, because in the words of the Ramban the world had become corrupted. But in addressing the Tower of Babel, He uses his four-letter name that we pronounce “Hashem.” The Ramban says this further proves their offense was against the Name itself and that their just punishment was delivered by means of that name.
Interestingly, the Ramban ties this to the destruction of Sodom which is done with the name Hashem, although you might have expected it to be the attribute of justice. This shows that the malfeasance of Sodom and Amora was not the sort of corruption that we associate with the generation of the flood, but rather a malicious and willful rebellion against the very divinity of Hashem and the unity of His name. For this reason, those cities and all of their inhabitants were destroyed in a miraculous manner by the immanent and omnipotent Divine that they had denied and repudiated.