These things have I spoken unto you, that my joy might remain in you, and [that] your joy might be full.
Note 57 at Joh 15:11: These statements about keeping Jesus' commandments were spoken not to bring oppression but rather that the joy of the Lord might abound in us. It is the devil's oldest trick to tell us that the commandments of God are given to keep us from being happy. That's the line he sold Eve (Ge 3:4-5). Choosing her own way over God's way surely didn't bring Eve happiness.
God has given us commandments because He wants us to be happy, and we don't have enough sense on our own to pick the right way (Pr 16:25 and Jer 10:23); therefore, He chose for us. If we will keep the Lord's commandments, this will assure us that our joy will be full.
Note 58 at Joh 15:11: The Lord desires for us to have joy--and not just joy but fullness of joy. Christians are the only ones who really have anything to be happy about.
Remember that Jesus was saying all these things in Joh 14-15 so that we would not be offended in trying times (Joh 16:1, see note 5 at Joh 14:2). Joy is one of the strongest weapons we have against depression and discouragement. It is an offensive weapon against the devil (see note 4 at Mt 4:9 and note 3 at Mt 21:16). In a situation where our faith is being severely tested, praise to the Lord will take our attention away from our problems and focus it on Jesus, thereby releasing the joy that comes through faith (1Pe 1:8).