For all who have sinned without the law will also perish without the law, and all who have sinned under the law will be judged by the law. (ESV)
We all love good news. Sometimes you have to hear the bad news before you hear the good news. That is the case with the book of Romans. The Apostle Paul is writing a complete theology of salvation, that is the good news. But before we get to the good news he defines for us the bad news. In particular, the bad news is that we are all under God's judgment.
Paul gives different categories of people who will be judged. Let's start with the first category; those who sinned without the law. Paul is speaking of the Law that was given to Moses for the people of Israel. Those who lived before the Law was given do not get a free pass. They will be judged based on the more limited knowledge they did have.
In Romans 1 Paul made the case that man, before the Law, was able to see God's revelation in what was made. Did man respond to God's creation by giving God glory and thanking him for what had been made? NO! Man refused to give thanks to God and instead worshiped the things that were made instead of the creator. Those who sinned without the law will still be judged.
The second category of people is those who received the Law. Sadly, all those who received the Law also sinned. They were unable to keep the Law. The Pharisees, who were the religious leaders and teachers of the Law, were often the target of Jesus himself because of their sinful hypocrisy. Paul himself was a Pharisee, and persecuted the church. No one could keep the Law.
What do we take away from this bad news? We take away an understanding that we are all under judgement and that we need a Savior. What's the good news? That Savior is Jesus and he has salvation for those who will turn to him.