John Calvin, in his Institutes of the Christian Religion, in Book II, chapter 7, sections 6-13, sets forth three purposes of the law, or "uses of the law" as it is usually termed. The first is, as Jeff the Baptist noted, is to inform people of their sin and to bring about repentance. The second use of the law is simply to bring about social order by restraining wrong-doers though threat of punishment. The third use of the law is that the law the means by which we are educated in what we, as Christians should do, how we should act. Calvin considered this use of the law to be it "principle use", which is "more closely connected with its proper end". As Calvin puts it (in section 12), the law "is the best instrument for enabling them daily to learn with greater truth and certainty what that will of the Lord is which they aspire to follow, and to confirm them in this knowledge; just as a servant who desires with all his soul to approve himself to his master, must still observe, and be careful to ascertain his master’s dispositions, that he may comport himself in accommodation to them."
John Wesley, in his sermon 34, The Origin, Nature, Property and Use of the Law, takes a little different approach. Although he too talks of three uses of the law, he omits Calvin's second use of restraining evildoers, and divides Calvin's first use of the law into two. Wesley's first use "without question, is, to convince the world of sin". The second use, according to Wesley, is, for he who has been so convinced of his sin, "to bring him unto life, unto Christ, that he may live". Wesley knows that, at this point, "Herein the law is at an end. It justifies none, but only brings them to Christ."