God would know it without having to go down and check it out personally because God is omniscient. He knows all things; the hairs on the heads of the people of Sodom and Gomorrah were numbered. He knew everything they had ever done, every idle word they had ever spoken. He didn't need to canvass them with a new census to see how wicked they were.
There are two ways of approaching this difficult verse (Gen. 18:20). Often these conversations with God were really conversations with angelic messengers who were representing God. The angelic messengers themselves do not have the omniscience that we attribute to God. It may be in this case that the angelic visitor who was going to check out the situation was speaking for himself.
Even in Abraham's test at Mount Moriah, where he was told to offer Isaac on the altar and at the very last minute as he stretched out his arm to plunge the knife into the chest of his son, the voice of the Angel of God stopped him and said, "Lay not thy hand now upon your son, Abraham, because now I know that you love me." The suggestion is that God didn't know of Abraham's love before this happened. It's as if God were a celestial spectator pacing back and forth, wringing his hands, hoping that Abraham would make the right decision and do the right thing, but he was helpless to do anything about it until the outcome.
A lot of people think of God in those terms, as if he is just a cosmic spectator of what's going on and he doesn't know the end before the beginning. They make God finite, dependent, derived, everything less than the God who is revealed in Scripture.
The second approach to this passage takes into account that every time the Bible describes anything about God, whether it's in a narrative or a didactic passage, whether it's abstract or concrete, the only language available to the biblical writers was human language. We can't talk as fish, we can't talk as snails, because we're not snails and we're not fish. Nor can we talk as God. When God speaks to us and reveals himself to us, the only language we can understand is human language. When the Bible uses what we call phenomenological language, or the language of appearances, the Bible speaks of God's learning. It describes very crude images, such as God having his feet on the couch. At the same time, the Bible tells us that even though it uses human language, God is not a human who can be contained or fully described by these figures of speech.
I think that in the situation of Sodom and Gomorrah, either the angel was speaking for himself—he did have to go see what the cities were like—or this was God's way of explaining the situation to Abraham, letting Abraham know what would happen and that God was in charge.