In the Sermon on the Mount, when Jesus reveals to the Pharisees the depth of how they continually violate the spirit of the law (and so, fall short of righteousness on their own), He says, "[B]ut I say to you that everyone who looks at a woman with lust for her has already committed adultery with her in his heart" (Matthew 5:28).
Was Jesus saying that lust is equal to adultery? I love what R.C. Sproul has to say in The Holiness of God to clarify this passage in response to the very common idea that all sins are equally bad:
We tend to think that sin is sin and that no sin is greater than any other. We think of Jesus' teaching in the Sermon on the Mount that to lust after a woman is to be guilty of adultery. We are aware that the Bible teaches if we sin against one point of the law, we sin against the whole law. These two biblical teachings can easily confuse us about the degrees of sin.
When Jesus said that to lust is to violate the law against adultery, He did not say or imply that lust is as bad as the full act of adultery. His point was that the full measure of the law prohibited more than the actual act of adultery. The law has a broader application. The Pharisees thought that because they never committed the actual act of adultery, they were free of sin against the law. They assumed that if they actually refrained from killing people, they were keeping the law against killing. They failed to see that unjust anger and hatred were also included in the wider meaning of the law against killing.
To say that one sin is not as bad as another is not to deny its seriousness or say it's unimportant. There's no doubt that different punishments will apply, but no sin can be swept under the rug by a perfectly just Judge.
While lust will not receive as great a punishment as adultery, don't lose sight of Jesus' point that either sin puts you in a position of lacking the righteousness you need to be with an infinitely righteous God. Either sin requires justice—not only for the sin, but for the much more serious rebellion against God's authority that lies behind the sin. And the penalty must be paid by someone.