Peace is Jesus’ bequest to His disciples. Peace was commonly used at this time as a word of greeting (20:19, 21, 26) or of farewell. It thus comes in aptly in this final discourse of our Lord’s. But the expression used here is not the usual formula of farewell; Jesus is using the term in His own way for His own purposes. The repetition of “peace” is impressive. The concept is important. Having stated positively what He gives, Jesus goes on to differentiate this give from anything that the world can give. When the world uses “peace” in a greeting it expresses a hope. It can do no more. And even that it usually does in no more than a conventional sense like our “good-bye” (= “God be with you”). But Christ effectually gives His people peace. Moreover, the peace of which He speaks is not dependent on outward circumstances, as any peace the world can give must necessarily be. Because He gives people such a peace Jesus can enjoin them not to be troubled in heart no cowardly. A Christ given serenity excludes both. In the Bible “peace” is given a wider and deeper meaning than in other Greek writings. For the Greeks (and for us) peace was essentially negative, the absence of war. But for the Hebrews it means positive blessings, especially a right relationship with God. This is to be seen in the Old Testament and is carried over into the New. The word here has its fullest content.
Leon Morris, The Gospel According to John, New International Commentary on the New Testament, Eerdmans, 1995, pg. 583-584