"Cursed be the man who lets the hair of his wife be seen," goes the Jewish rabbinical teaching. "A woman who exposes her hair for self-adornment brings poverty." Muslim women hide theirs under hijab. And Catholic nuns who cover their heads are following the unambiguous teachings of St Paul. "Now I want you to realise that the head of every man is Christ, and the head of the woman is man, and the head of Christ is God," he proclaims in Corinthians. "A man ought not to cover his head, since he is the image and glory of God; but the woman is the glory of man.... For this reason, and because of the angels, the woman ought to have a sign of authority on her head."

So all the great faiths have united in an obsession with women's hair which betrays a peculiar ambivalence. It's so precious that it must be covered and protected as a treasured gift from God. But at the same time it is denigrated as a trap, a temptation, a zone so erotic that if exposed it will inflame the lusts of men and turn them to savages.

Angelic and devilish, lustful and pure – the contradictory symbolism of women's hair is epitomised by the New Testament's most controversial heroine.

"When Mary Magdalen repents of her worldliness," explains Marina Warner, "she sheds all her clothes, her vanities, her jewels, and then her hair miraculously grows to cover her. This links to the hairy figure as an outcast in the wilderness, the desert where she repents. In her hairiness she bears the marks of her sexual sin upon her, and by accepting them she is redeemed."

This duality is repeated again and again in the iconography of Western art. Boticelli's naked Venus is coyly covered by her long, luxuriant locks. Rosetti depicts his Lady Lilith with enchanted hair – beautiful and deadly.

A key to this fascination can be found in the story of Rapunzel, who literally lets her hair down to allow the courting prince to penetrate her tower. Rapunzel is another name for rampion – a plant that can fertilise itself. And in the original story Rapunzel becomes pregnant – just like her mother whose craving for the plant in the witch's garden led to the incarceration in the first place.

So hair represents both fertility and suspect female sexuality. In a Mexican festival held in honour of the goddess of maize, for example, women used to shake and toss their long, unbound hair in ritual dances to encourage the crop to flourish in similar profusion. Across Mediaeval Europe it was thought that the power of witches lay in their hair, which is why they would be depilated before undergoing torture. The flowing hair of Hindu goddesses signals both celibacy and eroticism, divine power but also the demonic qualities of a woman outside male control.

It's a motif echoed in the classical world. Ulysses had to brave the sirens who, with their hypnotic singing and silken tresses, lured sailors to their deaths. The beautiful hair of mermaids disguised their suspect fishiness. Then there were the goddess ogres, the Gorgons, the most terrifying of whom was recognised by Freud as the archetypal female ball-buster.

"The hair upon the Medusa's head is frequently represented in works of art in the form of snakes, and these once again are derived from the castration complex," he asserts. "It is a remarkable fact that however frightening they may be in themselves, they nevertheless serve as a mitigation of the horror, for they replace the penis, the absence of which is the cause of the horror. This is a confirmation of the technical rule according to which a multiplication of penis symbols signifies castration."

Freud may have been right to identify women's hair as a threat to male potency – but misguided as to the reason why. It's just as plausible that men are shocked and awed not by women's castrating penis envy but by the female ability to procreate. That the missing factor in Freud's litany of neuroses is fertility envy. And what the dominant religions insist must be covered up is not so much women's sexuality, but the reproductive ability which once caused them to be worshipped.

According to Elaine Morgan, whose ground-breaking The Descent of Woman has just been republished, fertility is the reason that we evolved our hair in the first place. Anthropologists have tended to be somewhat vague on the subject of human hair, usually assuming that men lost their body fur so that they could stay cool while hunting, and gained head hair to protect them from the sun – an equation so obviously illogical that Morgan has little trouble demolishing it.

Instead, she proposes the notion of an aquatic age, when we lost our body hair to make water living easier. Women developed dangling breasts and long hair so that their offspring would have something to cling to in the waves. What Elaine Morgan is challenging is not only the biblical assumption that man came first, with woman as an inferior afterthought. She's also overturning one of the most sacred facets of the theory of evolution: sexual selection.

The "androcentricity" of anthropologists, she claims, meant that they could only interpret the universe from their own sexually obsessed, potency-charged perspective which assumed that sex must be the primary urge for the survival of the species.

Morgan postulates instead that it was child rearing that determined our evolution, so it was women who triggered the major changes which distinguished homo sapiens from the apes. Forget about thumbs and the use of tools. What mattered was smooth flesh, breasts, swinging hips and, of course, hair. These, she claims, are the keys to how we evolved from the sea.

But despite its association with generative powers, hair is also universally connected with baseness and lust. In his influential essay 'Magical Hair,' Edmund Leach notes that across cultures, with astonishing consistency, long hair is equated with unrestrained sexuality. So how we cut and tend and style our hair demonstrates our changing attitudes to nature itself – the conflict between the desires to control or to imitate it.

Once Darwin had made the shocking suggestion that man is simply a species like any other, descended from common apes, the impetus to leave nature behind and negate our animal nature became far more urgent. And for women, this ambition became more achievable with advances in technology.

For thousands of years they had suffered a litany of tortures in the struggle to tame their hair – the endless twisting, the irons, the all-night rollers, the back-combing, the flopped flick-ups, the pudding basins, the noxious fumes of ammonia and bleach.

And then, 100 years ago, the perm was invented. The original electric perm, pioneered in 1906 by the German hairdresser Karl Nessler, entailed a complicated procedure involving heated brass rods and a concentrate of sodium hydroxide, which would cause the hair to become dry and brittle and, at worst, burn it all off or scald the scalp.

But despite the dangers, the perm offered a new, improved means to transcend nature. It permitted white women to rise above their lank, mousy rats tails and put bounce and body into their heads.

Meanwhile, though, black Americans were determinedly emulating whiteness by straightening out those tell-tale curls. Like the perm, early hair straighteners had involved a hazardous cocktail of toxic chemicals and heated implements. But just a year before Kessler's radical invention a black entrepreneur, Madame CJ Walker, popularised a new, safer method involving customised shampoos, combs and oils. She became the first black millionaire, and claimed that her products allowed black women to rise above a dominant culture that labelled them as promiscuous and unintelligent.

But it wasn't just frizzy hair that invited those associations with our apish ancestors. It was darkness, too. Along with the invention of the perm came newer, safer bleaches. And that was how the 20th century came to be so hysterically obsessed with the value of blondeness, typified by screen icons from Jean Harlow to Grace Kelly, Mae West to Marilyn Monroe.

What they represented was an ideal of womanhood which Darwin himself seemed to suggest was a direct result of evolution. He proposed that the reason why, unlike any of our apish forbears, we have so little body fur and so much head hair, is that ancestral males chose females rather than the other way round, as was the norm in the rest of the animal kingdom. And they preferred hairless females.

This is a perfect example of Elaine Morgan's 'androcentricity'. Darwin assumed a male preference based on that of many nicely brought-up Victorian gentlemen. John Ruskin, for example, is widely thought to have been unable to consummate his marriage because of the shock of encountering his new bride's bodily hair. His female ideal was smooth-bodied and fair-headed like his childhood love, the unreachable Rose la Touche. Another child figure, the wonder-filled Alice, was the object of Lewis Carroll's dodgy desire.

So the great scourge of the creationists somehow also conspired with them in supporting one of their most profound prejudices. The desire to disguise our animal origins led to a kind of hair hierarchy. The most dark and frizzy were considered less human, less intelligent, less blessed than the blonde and the hairless.

Those great 20th century advances in hair styling – the perm, the straightener and the safe dye – were essential tools for the remaking of women to fit these notions. But they also became instruments of liberation.

The perm ushered in a century in which hair styles have testified to the changing status of women. The bob was a strike for independence; curly waves a longing for femininity during the war-darkened forties; the bouffant declared a defiant impracticality, followed by the unfettered 60s look redolent of freedom and fun. Big hair was for the boardroom, punk spikes a rejection of it. Some feminists wear their hair as a badge of honour – others cut it all off to avoid the admiration of men.

The last time the perm rode the waves of popularity was in the 1980s, when the vogue was for the bushy frizz exemplified by Glenn Close in Fatal Attraction. This fashion emerged out of the black power movement of the late 1960s. The new 'black is beautiful' consciousness was embodied by the radical academic Angela Davis, a liberationist who wore her hair in a wild Afro. White women, with their exaggerated mass of curls, proffered an unconscious statement of sartorial sisterhood.

These days, though, black women no longer feel the need to 'go natural' in order to assert their identity. Their corn rows, braided extensions, buns, wigs and straighteners mix Afro-Caribbean extravagance with western flavours in a kind of postmodern declaration of confidence in their roots. Similarly, western women, with their bricolage of hair pieces, highlights, tongs and glues are demonstrating a mastery over those two conspiring enemies of women's self-determination: nature and religion.

Liberation for women means recognising the tyrannies of nature by conquering them. So bring on the perms, weave in the extensions, tie on the ribbons , fight the grey with scarlet and purple, add golden plaits if you're black or geometric black stripes if you're blonde, shave the whole lot off, scrape it into a pleat, highlight and streak it, chop and layer it or leave it loose and wild.

Display is an act of rationalism, excess the enemy of superstition. And taking control of our hair is a gesture of defiance – a wresting back of power from the mullahs, the rabbis, the priests and the prelates who seek to keep us under cover.