A recurring theme throughout the Waltons was that John Walton while "religious in his own way" didn't attend church. Throughout the series, John attended the Walton's Mountain Baptist church on only a handful of occasions. "The Sinner" when he spoke up for Reverend Fordwick, "The Sermon" when John Boy delivered the weekly message, and " Baptism" when a visiting fire and brimstone preacher had services there.
In The Sinner and Baptism John made it clear that he did not want to be yelled at. John Boy noted in Baptism that if the visiting preacher and John simply sat down with each other and talked John would probably come around to his way of thinking.
Yet, John was raised by Esther and Zeb Walton who throughout the series were very obviously regular church goers though Zeb appears to have had a somewhat flexible attitude about church attendance.
So it would seem obvious that John was probably a regular church goer as a boy.
When did this change? My thinking is it was after he came home from World War One. In the episode where Ashley Longworth (Jonathan Frakes) refuses to marry Erin because he is an atheist (prompted by his having to kill an enemy soldier up close and personal with his bare hands), John indicates that having to kill during World War One severely tested his faith much as it had Ashley's.
Note, that John was drafted and left to fight World War One not long after he and Olivia were married while she was pregnant with John Boy (not to his knowledge at that time) so if John returned from the war and stopped attending church it would seem like he hadn't been attending church during their entire marriage.
It is also much easier to understand a committed religious person like Olivia being so understanding of John if she saw his lack of church attendance to be rooted in his experiences during the war. Not to mention the death of his brother Ben during that war.
IIRC (If I Recall Correctly) Olivia had been trying to get John baptised even before they were married so John may have been having thoughts about religion for a very long time. I went that way as I grew up. I went to Sunday School and church when I was a kid and then church into my early teens. But then I began to see things that made me second-guess the church and its parishioners. Like John, I began to worship in my own way.
I was born into a Baptist family and have always considered myself a Baptist but I will keep further comments to myself.
In The Homecoming, when Olivia was telling the children about their elopement, she said that her family was against their marriage. That’s why they had eloped. One of the children asked,”What did they have against Daddy?” Olivia replied, “My family were big Baptists, and your daddy, in those days, wasn’t exactly religious.” Grandma immediately spoke up and said, “He was religious. He just wasn't a churchgoer.” So, John must’ve left the church before he married Olivia.
I can see John as a teenager wanting to go out and (figuratively) “sow his wild oats” so to speak. He wanted to do all the things they preached against in the church, so he stopped going to church. Grandma probably would not have allowed it. I can see her having the sort of attitude that “You live under my roof. You’ll do as I say.” Grandpa was more easygoing and probably allowed John to make his own choices.
John is probably the most laid back Walton when it comes to religion and going to church, while his mother, Esther, is probably the most strict Baptist in the family. I don't think that this is a coincidence.
We know that John, or Johnny Walton as he was known back then, was a 'heathen'. When Callie May comes to town in The Torch, she thoroughly embarrasses Corabeth by strongly hinting that she and John used to go skinny dipping together. If Esther was aware of this behaviour at the time, she would not stand for it at all and I can imagine the two of them having very heated discussions about his youthful behaviour. He would have seen it as just wanting to make the most of his youth and have lots of fun, while Esther would have seen it as sinful and shameful - with Zebulon no doubt finding it hilarious. Who knows what other 'sinful' activities a young John may have enjoyed on the mountain? I doubt it was only skinny dipping.
As everybody says, soon after he had to fight in the First World War. His brother was killed and he had to take people's lives. If John and Esther had had a rocky relationship over their differences before, those things would have felt trivial upon his return and they'd have been able to put them aside and be as close as they were throughout the series. Plus, all of John's harrowing experiences, coupled with the fact that he was now married and a father, would have matured him to the extent that he was no longer interested in pursuing his former 'wild' pastimes, with the only relic of that age being his dislike of going to church and his belief that the church was too strict in telling people how to live their lives.
I always forget to note this but not only was John Waltons faith challenged by his own personal experiences during WW1 but also to losing his brother Ben in that war.
And note, that Ben's body was never found apparently (up on the mountain in an episode at the graves of other Waltons, John and Zeb wonder "where Ben is buried?")
Most likely Ben is buried in a military cemetery overseas as many US WWI soldiers are. At that time with aviation in it's infancy it was easier to bury them where they fell than getting the body back home on a ship which would take days or even weeks to get to America. I imagine the smell wouldn't be very pleasant on the ship with all those dead bodies aboard.