When people hear of the Christian doctrine of grace - that is, God's freely-offered forgiveness for all our sins - they sometimes wonder if this forgiveness encourages Christians to sin. Why not do whatever we want and then ask for forgiveness at the end of our lives?
If a Christian truly loves God, they will want to do as he wants them to do; in other words, they will obey God (1 Jn 5:2-3). We realize what God has done for us in extending his grace to us, and in consequence, we love God. Because we love God and because God is good, we obey God and also love those around us (since God loves them).
The Apostle Paul addressed this sort of argument in Romans 6:15-23:
What then? Shall we sin because we are not under law but under grace? By no means! Don't you know that when you offer yourselves to someone to obey him as slaves, you are slaves to the one whom you obey - whether you are slaves to sin, which leads to death, or to obedience, which leads to righteousness? But thanks be to God that, though you used to be slaves to sin, you wholeheartedly obeyed the form of teaching to which you were entrusted. You have been set free from sin and have become slaves to righteousness.
I put this in human terms because you are weak in your natural selves. Just as you used to offer the parts of your body in slavery to impurity and to ever-increasing wickedness, so now offer them in slavery to righteousness leading to holiness. When you were slaves to sin, you were free from the control of righteousness. What benefit did you reap at that time from the things you are now ashamed of? Those things result in death! But now that you have been set free from sin and have become slaves to God, the benefit you reap leads to holiness, and the result is eternal life. For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord.
In other words, sin is not merely pleasure, but wrongdoing that ultimately harms us. Since Christians know the benefits of following God and the harmful effects of sin, they have every reason to follow God instead of continuing to sin.
A second reason for doing good is to demonstrate God's love and goodness to others, so that they too may know God:
For it is God's will that by doing good you should silence the ignorant talk of foolish men. Live as free men, but do not use your freedom as a cover-up for evil; live as servants of God. (1 Pt 2:15-16)