Ge 18:20 And the LORD said, "Because the outcry against Sodom and Gomorrah is great, and because their sin is very grave,
21 "I will go down now and see whether they have done altogether according to the outcry against it that has come to Me; and if not, I will know."
If God is omniscient then why do we read of God here going down to investigate Sodom and Gomorrah to find out if the outcry made against them were true?
God here is acting as a human judge. Though through His omniscience He already knows the matter of things, He goes down personally to Sodom and Gomorrah to demonstrate to Abraham that He is a judge who does not unleash His judgment without just basis of doing so without accurate knowledge of the matter. He is a just and fair judge.