It was not because of a necessity concerning binding judicial process or lack of information that God sent angels to investigate. Consider Elihu's words in Job:
23 God has no need to examine people further,
that they should come before him for judgment.
24 Without inquiry he shatters the mighty
and sets up others in their place.
25 Because he takes note of their deeds,
he overthrows them in the night and they are crushed. (Job 34:23-25)
The important words in Genesis 18 are these:
16 Then the men set out from there, and they looked down toward Sodom. And Abraham went with them to set them on their way. 17 The Lord said, “Shall I hide from Abraham what I am about to do, 18 seeing that Abraham shall surely become a great and mighty nation, and all the nations of the earth shall be blessed in him? 19 For I have chosen him, that he may command his children and his household after him to keep the way of the Lord by doing righteousness and justice, so that the Lord may bring to Abraham what he has promised him.” (Genesis 18:16-19)
Consider the words of Amos in Amos 3:6-7:
6 Is a trumpet blown in a city,
and the people are not afraid?
Does disaster come to a city,
unless the Lord has done it?
7 “For the Lord God does nothing
without revealing his secret
to his servants the prophets.
The investigation was part of God's work in elevating Abraham to the rank of prophet. God announces and explains his actions to the prophets so that they may communicate God's words and intention to the people.
God was moving towards establishing a legal framework to govern the relationship between him and Israel. The Law has many processes, rules and formalities that must be obeyed. God is teaching Abraham and those who follow how to build a civilization built on Law and Justice by His own example. God is our teacher.
A later example that adds additional motives for God is in Joshua:
7 The Lord said to Joshua, “Today I will begin to exalt you in the sight of all Israel, that they may know that, as I was with Moses, so I will be with you. (Joshua 3:7)
Right after this, the Lord stopped up the waters of the Jordan so that the people could pass over in safety. That act was God's miraculous endorsement of Joshua as His chosen representative.
In like fashion, giving Abraham advance warning about the destruction of Sodom and Gomorrah AND effecting the salvation of Abraham's nephew Lot was an act by which God began to exalt Abraham into a truly "exalted father".
There is another reason. The angels sent to investigate were the focus of a test. God did not destroy Sodom and Gomorrah, he destroyed them AND rescued Lot and his daughters. By risking his life to defend the "visitors", Lot proved his righteousness.
Jesus spoke in Parable about how a landowner sent out his servants to collect his share of the harvest but his servants were beaten or killed by the tenants. The poor welcome given to these three angels was an example of the murderous hearts of the tenants of this world. This story foretells what would happen to future agents of the gospel, but also the end that would come to those wicked tenants.