There's a blasphemous song about Santa Claus that says, "He knows when you are sleeping, he knows when you're awake, he knows if you've been bad or good, so be good for goodness' sake." I say it's blasphemous, because there's only one being in the universe about whom this can truly be said. Only God knows when you're sleeping and when you're awake. Only he knows if you've been bad or good.
Furthermore, the idea behind the song is to manipulate children to be good so that they'll get presents instead of coal. The reality is that if a person has been bad, he deserves much worse than coal in his stalking. He deserves God's just wrath.
God knows everything that we've done and everything that we will do.
Elihu says to Job,
For God has no need to consider a man further, that he should go before God in judgment. (Job 34:23)
Indeed, all men and women will face judgment one day, so what is Elihu saying? What he's saying is that God doesn't need to spend time looking over one's life when one dies in order to determine one's fate. No, already He knows all that the person has done and all that he will do. This should be a terrifying prospect, because all have sinned against God, and even one sin against a good and infinite God deserves eternal judgment.
This perfect knowledge of man's sin makes John 3:16 even more amazing. "For God so loved the world that He gave His only Son, that whoever believes in Him should not perish but have eternal life." God knows that everyone has sinned. Yet He loved the world in such a way that He would give His only Son for the world, namely all who would believe in His Son in any place and at any time.
If God did not know that all men were sinners worthy of judgment, then His sending His Son would not be as amazing, because perhaps, in such a god's mind, there are people good enough to save. But God knew for a fact that no one was good enough to save. But regardless, He gave His only Son to die for sinners like you and me.
If you believe in Christ, all of your many sins are forgiven, and you will spend eternity with God forever. And if you believe in Christ, consider how amazing God's grace is. He didn't give His Son to die for righteous people. He gave His Son to die for wretches like us. And He knew it all along.