Great is our Lord, and mighty in power; His understanding is infinite. Psalm 147:5
The simple definition of the word 'omniscient' is 'knowing everything'. The Bible clearly demonstrates that truth about God, as in Psalm 147:5 (above), and many other verses. Acceptance of this basic truth is foundational to us as Christians who desire to have a relationship with Him; we want to know Him, and you can't know someone well without knowing all about them.
God's understanding is infinite - there is no end to all that God knows, sees, hears, and understands in every minute detail. There is absolutely nothing that is beyond His complete knowledge and understanding! Just trying to wrap my head around that thought alone makes me dizzy. There is no way I can begin to comprehend the comprehension of God. The most reasonable thing for me, as a believer, is to accept it as fact, and think about how that truth affects me right where I am, right now.
There are basically two ways that I can be personally affected by the fact that God knows everything. I know that whatever I do, and even my most secret thoughts, I cannot hide it from Him. He sees me, and knows me better than I know myself. King David wrestled with this when he said "Where can I go to escape Your Spirit? Where can I flee from Your presence?" (Psalm 139:7) Of course this is based in the truth of God's omnipresence, He is everywhere, and so He sees everything. This can be either 1) comforting, or 2) convicting, depending directly on the kind of relationship you have with Him.
Since God knows everything, He always knows what is best for us. If we are seeking Him and His direction for our lives, we can surely trust that He will show us the way that is best. This can truly bring comfort in our times of troubles or uncertainty.
"Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge Him, and He shall direct your paths" (Proverbs 3:5-6)
If I am living my life in ways that are contrary to God's word, He knows, and I know He knows. When He calls my attention to the sin in my life, it is accompanied by a sense of guilt, or "conviction". At these times in our lives there are two choices: I either confess my sin to Him and ask for forgiveness, or I continue the same way in open rebellion, which says to Him that I care more about myself and my sin than I do about Him.
I know from personal experience that this is a miserable way to live. I have felt the pain of Psalm 51:3, "For I know my transgressions, and my sin is ever before me", and you probably have as well. That is no way to live, is it?
Because of God's great love for us, and because He knows and wants what is best for us, He pursues us and reminds us that if we will only turn back to Him we will be welcomed with open arms. I hope you are finding comfort today in God's omniscience. He knows you, loves you and knows what is best for you. If you are convicted by the fact that your life is not pleasing to God, He is waiting for you to come to Him. His desire is to receive you, to forgive you, and to bless you. Trust Him, because...The One who knows you best loves you most!