The Catcher in the Rye treats religion much the same way as it does education. There may be an intrinsic value to it, but it's been ruined by institutions and the people that run them. To the seventeen-year-old narrator, the biggest problem with religion is the social barriers that religion creates (which he directly compares to the social barriers created by money).
Although Holden Caulfield claims most of the religious people he runs into are phonies, and although he claims to be an atheist, he actually shows an extraordinary amount of respect for God and for religious people he runs into.
Holden's desire to protect innocence suggests an acute awareness of guilt; his theological musings about Jesus and forgiveness are offered to suggest Holden's desire for redemption.
Holden's feelings about religion exactly parallel his feelings about education.