According to most (internet) sources:
A faithful Indiana candymaker developed the treat as a witnessing tool. The candy is hard because God's church is founded on the rock, white because of Jesus's purity (or his virgin birth), peppermint flavored as a reference to cleansing hyssop, and curved to represent a shepherd's staff and/or the letter "J" for Jesus. Accounts vary regarding the red stripes, though they all agree that red stands for Christ's blood. Depending on which story you read, three small stripes might represent the Trinity, or small stripes could mean the stripes by which we're healed, or our small sacrifices in comparison to Christ's ultimate sacrifice (represented by a large stripe). One site even suggested that the green stripe sometimes featured reminds us that Jesus is a gift from God, though why green signifies a gift I don't know.
The motivation for candy cane apologetics can be seen in a quote from one of the sites: "Doesn't it seem strange that something we often see as unimportant and insignificant can be turned into something so vibrant, so important, simply by knowing its origin?" Of course, the same site proclaims that candy canes were originally a code between English Christians in the seventeenth century, when all public religious symbols were banned. That's simply not true, and neither are most of the other stories.
Tradition holds that in about 1670, the choirmaster at Cologne Cathedral was frustrated by fidgety kids at the living Nativity. He had some white, sugar-candy sticks made to keep the youngsters quiet. The sticks were curved like shepherds' staffs in honor of the shepherds at the stable (score one for the apologists). The idea caught on, and candy sticks became common at living Nativities all over Europe.
In 1847, a German-Swedish immigrant named August Imgard put candy canes on his Christmas tree in Wooster, Ohio. The sweets gained popularity here, too, and around the turn of the century, they assumed their now familiar properties of red stripes and peppermint flavoring. (Though these elements might have been added for symbolic purposes, there's no evidence to confirm that theory.)
In Albany, Georgia, in the 1920s, a candymaker named Bob McCormack made canes as special treats for family and friends, but the confections were difficult to mass-produce. Then, in the 1950s, Bob's brother-in-law Gregory Keller, a Catholic priest, invented a machine to speed up the process. Other members of the McCormack family worked on new packaging to keep the canes from breaking in transit, and Bob's Candies (www.bobscandies.com) became the world's leading candy cane producer.
So yes, the candy cane's origin was Christian. But it was almost certainly not designed to be the tasty theological treatise it's now purported to be. As Barbara "the cane mutiny" Mikkelson posted on the Urban Legends Reference Pages (www.snopes2.com/holidays/xmas/cndycane.htm), "It's charming folklore at best, and though there's nothing wrong with Christians now finding (and celebrating) symbolism where there wasn't any before, there is something wrong with myths being presented as fact." For the sake of history, I have to agree with her.