Would-be censors often justify themselves by claiming that certain kinds of material are harmful to children, and so must be kept out of public sight. It's worth thinking about this before we simply accept it at face value.
Such would-be censors tend not to provide evidence as to what kinds of material are actually most likely to produce harm if children see them. I accept that the state has an interest in paternalistic protection of children from propaganda for dangerous commercial products such as cigarettes, but what other kinds of harm might be relevant to public policy?
Before banning speech and expression on the basis of ... well, "What about the children?" ... a legislature would presumably need to be armed with studies of what kinds of material produce feelings of distress, shock, nausea, and so on, or even psychological trauma of the kind that could be evidenced by, for example, phobias, withdrawal, or nightmares, if children see it. There is no evidence that merely "indecent" material has such effects (as if young children are not already fascinated by "poo jokes" and the like — without seeming to suffer any ill effects as a result).
While more needs to be known, I suggest the following as a first approximation. The kinds of speech and expression that are likely to produce distress, or even psychological trauma, if shown to young children might include depictions of cruelty to animals, depictions of sympathetic human or animal characters being killed, and supernatural threats (such as threats of hellfire or divine vengeance). Obviously, it would difficult to frame legislation that is directed at protecting children from exposure to this sort of material, though classification codes that offer advice to parents, rather than attempting to ban speech and expression outright, may be of some value in this respect. Furthermore, it's not obvious that using an age such as 18 would be appropriate if the idea is to protect young children from distress or psychological trauma: i.e., it's not at all clear that any particular material is likely to have such an impact on, say, teenagers, any more than on adults.
Of course, what counts as "harm" to children outside the area of distress or psychological trauma might depend on the values of the person alleging the harm. A conventional moralist driven by Augustinian ideas that the body and its functions are shameful might find something "harmful" in any exposure of children to nudity — so think of all the "harm" suffered by children whose parents belong to nudist colonies or frequent Bondi Beach! But such contestable ideas should receive no official support in a liberal society.
By contrast, somebody with very different views may consider it more harmful to expose young children to traditional religious ideas. This argument actually seems more powerful. It may be that ideas of gods, devils, spirits, and so on possess a psychological attraction for human beings that is disproportional to the actual evidence that any such things exist (perhaps because we have evolved with a tendency to over-attribute agency to the phenomena around us). Children may be especially prone to absorbing such ideas — even though they are neither well-evidenced nor actually true — especially if they appear to be supported by the authority of parents or other adult authority figures. As a result, many children may grow to adulthood with false and possibly overly-restrictive worldviews that they then cannot easily shed: the ideas in these worldviews may lie close to the foundations of a particular individual's belief system. Such an individual might never shed these ideas, including, perhaps, overly restrictive moral ideas that go with them. Or she might succeed only after a period of great mental torment. So why not ban images or discussions of gods, devils, and so on, if children might be exposed to them?
Such a question merits the answer that no liberal society can be expected to adopt a policy of officially deeming the exposure of young children to religious ideas to be harmful. Any attempt to adopt this as a policy would fly in the face of traditional ideas of freedom of religion, which have included the freedom of parents to bring up their children in their own faith. Yet the argument that this actually is harmful appears to be far more cogent than the argument that children are harmed merely from exposure to, say, images of naked human beings, or to much of the wide range of material that can be described as "indecent". I suggest that, if the state seriously wished to protect children from harm that results merely from being exposed to certain kinds of communications, rather responding to ill-informed moral panics, it would need to conduct extensive psychological and sociological research. Even then, it would have a great deal of difficulty determining an objective standard of "harm" — and if it somehow succeeded, the product of its investigations might well be surprising.
In all the circumstances that I've referred to, concerns about harms to children merely from exposure to certain images or ideas justify only a relatively minor role for the state. It may have a significant paternalistic role in protecting children from advertising for dangerous products such as cigarettes. Beyond that, it can establish systems that give assistance to parents in making decisions about what material they should allow their young children to watch, read, or access on television and the Internet, but it is questionable how much genuine good the government can really do where the Internet is concerned. There is no substitute for parental supervision, and concerns about Internet nasties should not be used as an excuse for censorship of communications between adults.
Cool consideration of these issues strengthens, rather than weakens, the case for freedom of speech, and, indeed, for its constitutional protection.