Kim Watters here. According to legend there was a candy maker who wanted to invent a candy that was a witness to Christ.
First of all, he used a hard candy because Christ is the rock of ages. This hard candy was shaped so that it would resemble a "J" for Jesus or, turned upside down, a shepherd's staff. He made it white to represent the purity of Christ.
Finally a red stripe was added to represent the blood Christ shed for the sins of the world, and thinner red stripes for the stripes He received on our behalf when the Roman soldiers whipped Him. Sometimes a green stripe is added as a reminder that Jesus is a gift from God.
The flavor of the cane is peppermint, which is similar to hyssop. Hyssop is in the mint family and was used in the Old Testament for purification and sacrifice. Jesus is the pure Lamb of God, come to be a sacrifice for the sins of the world.
I don't know if this is true, but it sure makes a great story; one that I tell my kids as I hand them their candy canes, because He is the reason for the season.