Omniscient is the attribute of God by which God perfectly and eternally knows all things which can be known, past, present, and future.
God knows how best to attain His desired end. This demonstrates that man cannot hide from God because God knows all things. He knows the number of hairs on each head. He knows the heart and thoughts of every man.
Just because there may be nobody around to see us do wrong doesn't mean nobody saw it happen, because God did. Our intentions in the things we do are known to God.
We need to be sure that our attitudes and motives are aligned properly with our actions because God knows when we are doing things for the wrong reasons or motives.
Psalms 147:4-5 ESV He determines the number of the stars; he gives to all of them their names. (5) Great is our Lord, and abundant in power; his understanding is beyond measure.
(Also read Acts 15:18; Romans 4:17; Isaiah 46:9-10)