Until the 1960s, the word 'hell' was forbidden from US network television, although it made an appearance at the end of the Star Trek
episode 'City on the Edge of Forever
As previously mentioned, British television is more permissive in this respect, with one exception which I shall arrive at later. In comparison to British television, American television appears very conservative; American television movies which make it over the pond seem to feature no swearing, violence or nudity, and really, what's the point?
The f-word was first spoken on British television in 1965 (by Kenneth Tynan), whilst the c-word made its debut in the late 70s in an arty play on BBC2. There is an unofficial 'watershed' at 21:00, although the good stuff tends to appear from 22:00 onwards. The briefly-notorious mid-90s WW2 drama 'The Camomile Lawn' got into trouble for featuring a brutal rape immediately after 21:00. And famously the Sex Pistols caused a fuss in 1977 by appearing on Bill Grundy's lunchtime show and being very rude ('What a fuckin' rotter', etc), although they were clearly provoked by Grundy.
In general, comedy shows and light entertainment programmes have not featured swearing until quite recently ('Have I Got News for You' used to bleep out the f-words but now includes them). Having said that, Monty Python's Flying Circus was famously filled with bastards and shits, and that's just the cast! No, that was a joke. John Cleese often tells the tale of negotiating the amount of bastards and shits and gits and bastards with some editor or other, swapping bastards for shits in order to keep the show's bastard quotient within an acceptable framework. Hale and Pace, who were quite controversial in the 1980s, did not generally swear on television; neither did Jim Davidson. The Spitting Image puppets hit each other, and used the word bastard, but again did not swear. Until the late 1990s, 'blue' comedy of the kind mastered by Roy 'Chubby' Brown' was not shown on television at all. Bernard Manning was right out.
The exception to the liberal wave which swept the television airwaves in the late 1990s etc was ITV, which often edits films in order to remove swearing and violence, and also to fit its commercials-driven timeslot, and the fact that the news has to be on at a certain time, and that the watershed as mentioned previously starts at 21:00. Most notoriously, both 'Aliens' and 'Robocop' were torn to shreds when premiered - the former featuring the classic lines "You don't see them screwing each other over for a pension" and "We're gonna grease this rat-fat son of a bitch", whilst the latter had "Just give me my freakin' phone call!" and "You're gonna be one BAD mother(cut)". Both of these films features masses of graphic violence and were quite clearly not for children.
Not to mention the immortal 'Yippee Kay-ay, Kimosabe!' (I'm not making this up) from 'Die Hard'. After a particularly amusing parody by Harry Enfield on his television show ("You been funnin' my wife?", "Suck my cake, you melonfarmer!", "Fun you, cop-stacker!", etc), ITV relented. There is a website, at http://www.melonfarmers.co.uk/, which charts the ongoing saga of the BBFC's decisions to cut bits out of videos and so forth.
Most of the above is half-remembered from an old Jerry Sadowitz documentary (The Greatest F***ing Show On Television, shown on Channel 4 in the early 1990s) on the subject. Sadowitz himself was controversial in the 1990s, mostly for his bad taste jokes rather than swearing, although he got to swear a lot when he had a show on Channel 5. And then September 11 happened and people stopped swearing, and also being ironic. Or rather, if you're looking at the date above this writeup, September 11 will happen, because it hasn't happened yet.