People often question how God could hold someone morally responsible who did not have access to the Bible. You may have heard the objections, “How can someone be judged according to a standard he or she didn’t hear or read?”
The Apostle Paul explained in Romans that all people have an internal standard of righteousness that renders them responsible.
For when Gentiles, who do not have the law, by nature do what the law requires, they are a law to themselves, even though they do not have the law. They show that the work of the law is written on their hearts, while their conscience also bears witness, and their conflicting thoughts accuse or even excuse them. Romans 2:14-15
In short, all people created in God’s standard have an internal standard of righteousness that renders them responsible before God.
Honest people admit that they fall short of what they know they ought to do.
Keller shares a Francis Schaeffer illustration that explains the concept.
Romans 2 says the Gentiles — the pagans who don’t know the law of God and don’t know the Bible — still have in the conscience a certain knowledge of how they should live, and God holds them responsible for what the conscience tells them. [Francis Schaeffer] used to tell the following story to prove this point.
Imagine you have an invisible recorder around your neck that, for all of your life, records every time you say to somebody else, “You ought.” It only turns on when you tell somebody else how to live. In other words, it only records your own moral standards as you seek to impose them on other people. It records nothing except that you believe is right or wrong. And what if God, on judgment day, stands in front of people and says, “You never heard about Jesus Christ and you never read the Bible, but I’m a fair-minded God. Let me show you what I’m going to use to judge you.” Then he takes that invisible recorder from around your neck and says, “I’m going to judge you by your own moral stands.” And God plays the recording.
There’s not a person on the face of the earth who will be able to pass that test. I’ve used that illustration for years now and nobody ever wants to challenge it. Nobody ever says, “I live according to my standards!” (Quoted from Tim Keller’s sermon, “Life and Prosperity, Death and Destruction,” in Coming Home: Essays on the New Heaven and New Earth