Do good things and good things will happen to you. Do bad things and it will come back to haunt you". Why can't all TV have a simple message like that at its heart? The brilliantly slick My Name Is Earl carries the karmic principle through to its logical/absurd conclusion with reformed felon Earl Hickey making up for past wrongs by doing good deeds. It's a feelgood kind of show. Yet there's something rotten at the heart of Earl if you believe the whispers. Critics claim there's an unholy influence by the Church of Scientology on the show with jobs for the boys and a crypto religious subtext just two of the allegations. I thought it was all about making a better world?

It's a busy time to be a publicity officer for the Church of Scientology. First the controversy caused by the Panorama programme with the John Sweeney meltdown and now the creeping unease about My Name Is Earl. The Scientology-Earl connection begins with Earl himself - actor Jason Lee is a Scientologist, as is show creator Greg Garcia and Ethan Suplee who plays Earl's slow-reader brother Randy. So far, so creepy. But there has also been a guest appearance from Juliette Lewis, Suplee's sister-in-law and a practising Scientologist. Also down with the Church is Giovanni Ribisi, who plays recurring character Ralph Mariano. Church membership beats the crap out of having a union card and relevant experience, some might suggest.

Scientologists in Hollywood are nothing new, of course. Tom Cruise will be forever associated with the cult and other high profile members include Beck, Kirstie Alley, John Travolta and Priscilla Presley. While there is nothing in its doctrines that actually promotes celebrity, it certainly hasn't shied away from embracing the famous and the publicity that creates. Part-time musician and spree-killer Charles Manson is also said to have studied Scientology. Strangely, the Church seem less keen for people to know about that.

But what exactly are its teachings? The Church was the creation of L Ron Hubbard, the American science fiction author, as the religious development of his earlier secular self-help system dianetics. Scientology moulded the pseudo science of dianetics with spiritual concepts such as reincarnation and the idea that a person was an immortal spiritual being called a thetan.

A practice central to Scientology is auditing, where a trained counsellor gets the subject to unburden themselves of past traumatic events (engrams) and, crucially, bad things they have done in their past. The confessions are recorded in preclear (PC) folders and kept permanently by the Church. Although there is an auditor's code which states that the auditor must promise not to use the information gained during the audit for punishment or personal gain, a California judge ruled that "the Church or its minions is fully capable of intimidation or other physical or psychological abuse if it suits their ends. The record is replete with evidence of such abuse." So what, we might wonder, could be in Jason Lee's PC folder? And is this finally PC gone mad?

Then there's the concept of the "overt-motivator sequence". Crudely, this is what happens when a person does something bad then subconsciously causes something bad to happen to themself. It all sounds eerily like "Do bad things and it will come back to haunt you", Earl's karmic mantra. The entire series premise, in fact. So when Earl crosses something off his list of bad acts is he just clearing out his preclear closet? Maybe we're unwittingly witnessing an overt motivator sequence? Ruh-roh!

And it's not the first time Scientology has been implicated as influencing its showbiz members. When Isaac Hayes quit voicing South Park's Chef a statement issued on his behalf said it was because he objected to "inappropriate ridicule" of people's religious beliefs. This got one of the biggest laughs in the show's 10-year run from those working on the show. "In 10 years and over 150 episodes of South Park, Isaac never had a problem with the show making fun of Christians, Muslims, Mormons or Jews." co-creator Matt Stone pointed out "He got a sudden case of religious sensitivity when it was his religion featured on the show."

If you're wondering what so offended Shaft it's likely you haven't seen the Trapped In The Closet episode. Scientology and prominent Scientologists are roundly mocked and there is a scene where R Kelly sings a song about Tom Cruise being "trapped in the closet". There is also a priceless scene where regular South Park character Stan, who the Scientologists believe to be the reincarnation of L Ron Hubbard, tells them that "Scientology is just a big fat global scam" which prompts the followers to threaten to sue him. This was too much for Hayes. "There's a growing insensitivity towards personal spiritual beliefs." said the Chocolate Salty Balls vocalist. Can you dig it?

They certainly seem a touchy bunch, these Hubbard lovers. People tread warily around the subject of Scientology with its hearty appetite for litigation. They have a rich and varied history of lawsuits. Against newspapers, including the Washington Post, against individuals that teach Hubbard's work outside the official Scientology banner and against the US Internal Revenue Service. There is something about Scientologists that they don't seem to play well with the other boys and girls.

But maybe we're getting our panties in a bunch about this. A Hollywood actor has wacky beliefs? Hold the front page! He puts in a good word for his mates at his job? You'd think he was a chump if he didn't. And let's not forget that Hollywood has always had these cabals, real or imagined. Spencer Tracy's Irish mafia in the 1930s spring to mind and the more recent panic about the supposed gay mafia. The Scientology preclear folder could be the Catholic confessional without the confidentiality and many religions have karmic or "as ye sow, so shall ye reap" principles.

Yet still there's something creepy about Scientology. All this talk of purification gives you a queasy feeling. You can't trust a church which has its member's secrets on file and is willing to use them for its own ends. And many of their specific beliefs do give cause for concern like the necessity of "silent birth" which received widespread exposure in the latter stages of Katie Holmes' pregnancy. Female Scientologists are encouraged to keep the noise down during birth in case the newborn hears "negativity" which can emotionally scar the baby for life. As ever, there's no scientific basis for this and it seems just a neat way of keeping the chicks quiet.

Maybe people wouldn't be so bothered if My Name Is Earl wasn't such a good show. But being loved by so many people seems to bring a certain responsibility. If you have a good show about a good guy people expect you to do good things. And they don't expect you to start subliminally brainwashing them with your weird whacked-out beliefs. Whatever's happening on Earl, Scientology seems unlikely to shake off the common perception that it is a cult. I don't know, though. Mind control, dark rituals, misogyny - maybe it is a mainstream religion after all.

· My Name Is Earl, Thu, 10pm, C4