Christ wants His people to pray, and not lose heart, and He told a political parable to make the point.
The story begins with a civil magistrate --likely appointed, not elected -- who did not fear God or respect people. This means he was not a believer, nor even a particularly nice man. He did not hold a biblical worldview. He did not respect the ten commandments. He was a proud man. He probably was corrupt; he probably was not pro-life.
Up to him comes a nameless widow, the most unimportant member of society in that day next to children. In a patriarchal society, she had no husband to stand up for her. She was likely a poor woman. But she had a case, and she called upon the judge to vindicate her against her opponent. (We presume she was in the right).
The unjust judge brushes her off. She's probably too poor to bribe him, or maybe would not do so even if she could. She's only one widow, not a member of a large pressure-group. Maybe her case was trivial, compared to the judge's other responsibilities. So the judge ignores her, puts her off, hopes she goes away.
Yet she doesn't give up. She keeps on coming to him, probably pleading piteously with him to give her the justice that is due her. Finally, he throws his hands up in defeat. Even though he feels no obligations to her based on faith or even human respect, he decides to settle her case so she'll stop bothering him. "She's going to wear me out!", he thinks to himself.
Christ's point was the contrast between the unjust judge and Lord of all the earth. Christ wasn't saying that we need to pester God until He reluctantly pays attention and does what we ask. The point is that God is not an unjust Judge. He makes it His business to avenge (bring about just decisions) the causes of wronged people. He has a special, distinct loyalty to His own elect, His own people, that is a unique part of His relationship with them.
In fact, Christ says that God will speedily avenge His people who cry out to Him day and night (v.8), unlike the unjust judge. So what creates a problem? A lack of faith among God's people.
When Moses wanted to describe the Lord turning His eye of justice toward a situation (the tower of Babel), he said that the Lord "came down" (Gen. 11:5) to look at what was going on. This was an anthropomorphic expression, since God's Spirit is everywhere. It signified the Lord passing judgment, like a magistrate investigating a situation and forming an opinion on what to do.
I think this was what Christ meant when He said "When the Son of Man comes" (v. 8). He meant, not the second coming, but Himself drawing near to pass judgment (see James 5:9). Christ attributes to Himself a function of God -- avenging His own people -- that the Old Testament attributed to the Lord. What God the Father did to Egypt, Jesus Christ says He will do no matter where His people may be.
But the factor keeping Him from acting in many cases is the unbelief of His people.
This parable is an important one to remember, especially during times of cultural disorder and political dismay. Christians know a President over all the presidents, a Supreme Judge above every judge, and a Representative higher than any congressman. Christ promises us quick, avenging relief from Heaven. But He also says the force that prevents answers from coming is our own unbelief. Christians become panicked, hysterical, irrational, and despairing, because first and foremost we are doubters.
But the parable promises us that all it takes is one widow -- just one -- to bring God's justice down. So we should keep praying, and not lose heart.