From what occurs in keeping with the divine design, God is aware of, knows, and sees everything down to the least detail that is done against the divine design.
When people are involved in evil, God does not hold them there; he holds them back from evil. He does not lead them; he struggles against them. He perceives the quantity and quality of evil and falsity from their constant wrestling, striving, struggling, fighting, and pushing back against his own good and truth, and therefore against himself. This comes from God’s omnipresence in everything of his own design as well as his complete knowledge of everything in that design.
By analogy, when your ear focuses on harmony and on sounds that are in tune, and then something discordant or out of tune occurs, you notice precisely how wrong and how far off it is. A similar awareness occurs when you focus on some pleasure and then some unpleasant sensation interrupts.
By the same token, when your sight focuses on something beautiful, your appreciation of it is heightened if there is something misshapen beside it; this is why painters often place an unpleasant face next to a beautiful one. The same thing happens with goodness and truth. When evil and falsity struggle against good and truth, we perceive the evil and the falsity distinctly by contrast.
Everyone who focuses on goodness can sense evil, and everyone who focuses on truth can see falsity. The reason is that goodness is actually in the warmth of heaven and truth is in its light, while evil is in the coldness of hell and falsity is in its darkness. An illustration of this is that the angels of heaven are capable of seeing what goes on in hell and what type of monsters are there; but the spirits of hell are completely unable to see what goes on in heaven. They cannot see the angels any more than a blind person could, or more than an eye would see something by looking into empty air or ether.
Those who have the light of wisdom in their intellects are like people standing on a mountain in the middle of the day clearly seeing everything below. Those who have an even higher light are like people with telescopes who can see things off in the distance or far below as if they were close at hand. Those, however, who have defended falsities and are therefore in the faint, deceptive light of hell are like people on the same mountain at night with oil lamps in their hands who can see only what is nearby and even then can barely make out vague shapes or tell colors apart.
Some people have some light of truth but still have evil in their lives. As they go on loving and enjoying their particular evil, at first they view things that are true more or less the way a bat views towels on a clothesline in a garden—it flies to them as a safe haven. Later on these people become like night birds, and then at length like horned owls. Then they become like a chimneysweep stuck in a dark chimney; when he raises his eyes, he sees the sky through the smoke; when he looks down he sees the hearth from which the smoke ascends.
Keep in mind, however, that it is one thing to sense things that are opposite and another to sense things that are related. Opposites are things that stand outside and against the things that are inside. Something opposite first arises where one thing completely stops being anything and something else then arises that tries to act against the first thing, like one gear that opposes another gear, or a current that goes against another current. Related things, however, have to do with the arrangement of many different elements into a design so that they work together in harmony—for example, the gems of different colors in the sash across a queen’s chest, or the multicolored flowers used in a garland to please the eye. Each side, then, contains things that are related to each other. The side of good contains things that are related to each other, and so does the side of evil; the side of truth contains things that are related to each other, and so does the side of falsity. Things related to each other exist in heaven and they exist in hell, but the things related to each other in hell are all opposite to the things related to each other in heaven.
Now, because God is aware of, sees, and knows all related things in heaven based on the divine design in which he himself is, and as a result he is aware of, sees, and knows all the opposing related things in hell, as follows from what was just said, therefore it is clear that God is just as omniscient in hell as he is in heaven. He also has full knowledge of people in the world. He is aware of, sees, and knows our evils and falsities from the goodness and truth that he is in and that are essentially him. As the Word says, “If I ascend into the heavens, you are there. If I lie down in hell, behold, you are there” (Psalms 139:8). Elsewhere it says, “If they dig through into hell, from there my hand will take them” (Amos 9:2).
from True Christianity, Sections 61, 62