The Catcher in the Rye was written by J. D. Salinger when he was about thirty-one years old, but he decided to have the book narrated by his young hero Holden Caulfield, who was sixteen years old and a dropout. Salinger needed to do at least two things: He had to establish that a sixteen-year-old boy was capable of writing such a book, and he had to keep reminding the reader that it was an adolescent boy who was telling his own story. The red hunting cap was probably not intended to symbolize anything so much as it was intended to remind the reader that Holden was still a kid. Holden was probably wearing a sports coat and slacks with a dress shirt and necktie. But the red hunting cap would have looked like something that only a kid would be wearing. Nobody would pay much attention in a place like Manhattan, but if we imagine Holden walking down one of the major streets we can't help thinking that this hat is something only a kid would wear, especially in the 1950s when men and women in big cities dressed pretty conservatively and men still wore conventional hats. If Holden's hunting cap symbolizes anything, it probably symbolizes that Holden is trying to be grown up but is still a kid at heart. It is significant that he gives the cap to his little sister Phoebe, who is only about ten years old. It suits her well, and she likes it. It is something a kid would like. When Holden gives it away, it is as if he is giving up his childhood. Something similar happens in Carson McCullers' The Member of the Wedding. When the young heroine Frankie Addams decides that she wants to be more "grown up," she gives her favorite doll away to her little cousin John Henry West.
Holden calls it a people-hunting hat. It's like the one Elmer Fudd uses to hunt Bugs Bunny, a black comedic symbol of passive aggressive behavior. It parallels the canon that Holden speaks of in the first chapter, the one that he wishes he could fire on the crowd at the football game. Holden uses words as his weapons, and he buys the hat at a Thrift store to look ugly, to muster up false courage in running away, to protect himself against the phoney adult world.
Also, the hat is red like Allie’s bright red hair. It's a symbol of Allie's death and Holden's survivor's guilt. Holden wishes he would have been the one to have died, instead of his brother. Salinger uses the hat much like Allie's baseball glove: Holden pays guilty homage to them both; they are his sacred objects. He writes a touching composition about the glove, and he wears the hat on his mock heroic quest. They are reminders of the past that help him confront the present.
Holden Caulfield has just returned from a fencing meet in New York City, which was a disaster. Holden, the fencing team manager has left all the equipment on the subway and the team never make it to the tournament. We also learn that Holden has been kicked out of Pencey for failing in four subjects.
This is the third private school Holden has attended. Pencey is, according to Holden, full of phonies.
Holden buys a red hunting hat in New York for a dollar after he loses the school’s fencing equipment. The hat has a very long peak, and Holden wears it backwards, with the peak turned to the back. He puts this hat on when he is under a lot of stress, almost as if the hat can protect him and ends up giving it to his sister Phoebe near the end of the story.
It is also worth noting that "red" signifies danger. Holden's mind is in a perilous state, he is on the verge of a breakdown. The colour of the hat flags this for us. Similarly, the hunting theme associated with it contain elements of danger, Holden feels that there is something from which he must escape, just as if something were hunting him.
There is no right or wrong answer for such symbolism as everyone sees it in a different manner, just depends on how you take in the words. This was my take on the symbolic meaning of the hat:
The red hunting cap: The hat seems to represent Holden’s isolation. He always pulled his hat down when he didn’t feel like engaging in a situation, for example when Ackley kept talking to him; he put on the hat to halt the conversation. It also seems to represent him, the hat is unique and out there most people considered it wack, just like how Holden is seen by people around him. Holden also doesn’t seem to see his own self-worth, just like people don’t see the worth of a hat. Somehow Holden and the hat are parallels. He uses it as a way to keep away from the world and surround himself.