Your pastor was probably quoting a verse from the Old Testament which says, "The secret things belong to the Lord our God, but the things revealed belong to us and to our children forever, that we may follow all the words of this law" (Deuteronomy 29:29).
This verse actually tells us two important truths. It reminds us first of all that our knowledge is limited, and there are many things about God and the universe we never will know. But God does know them; in fact, His knowledge is limitless. For example, you and I don't know what will happen a day from now, or a year from now–but God does know, and because He does, we can trust our future into His hands.
But this verse also reminds us that there is much we can know about God and His will–and the reason is because God has revealed it to us. This is why the Bible is so important, because it is God's Word, and in it we learn who He is and how He wants us to live. Most of all, the Bible points us to Christ, who came to save us from our sins and give us the gift of eternal life.
The Bible says, "The law of the Lord is perfect, reviving the soul. The statutes of the Lord are trustworthy, making wise the simple" (Psalm 19:7). Is God's Word part of your life, and are you seeking to live by its truth every day?