It is 6C outside, and a dusting of snow can be seen on the Schauinsland - the low hill overlooking Freiburg, where the good burghers of the southwest German city take their children hiking. In Meinhard Hansen's apartment, however, it is perpetual summer; the sun streams in through tall, south-facing windows and a gauge on the wall reads '24C'. Next to it, the words 'Heizung 0' appear in a small glass window. 'Heating, zero,' Meinhard translates. 'In fact, we haven't switched the heating on for weeks.'

While a typical home in Germany (or Britain, for that matter) squanders 220 kilowatt hours of energy a year for each square metre of floor space, this one wastes 15kWh/m2 a year. 'My mother-in-law has an old house in the country,' says Meinhard, 'and she uses 6,000 litres of oil a year to heat it. We use 150 litres.' On one wall there is a radiator, but it is stone cold. 'It's just for psychological reasons,' he says, 'because my wife never believed this was possible.'

The impossible dream was a 'passive house' where no active system is needed to maintain a comfortable temperature. Super-insulated with foam and lagging up to 30cm thick, the flat is triple-glazed and externally sealed. Fresh air enters at ceiling level and is sucked out through a funnel on one wall. 'The heat from the warm air going out is transferred to the cold air coming in,' says Meinhard, Freiburg's chief architect and a world authority on passive houses. So far, his company has built about 100.

Opening a cupboard, he shows me how the cold and warm ducts meet in a knot of corrugated silver piping. The result? An almost constant temperature without the need for heating - because warmth is provided by cooking, lighting, even warm-blooded mammals. 'My wife and I produce 100W of energy each, the dog another 20W,' says Meinhard, bending down to check the animal is still breathing. 'If we hold a dinner party, we have to open the windows.' By his calculation, the entire flat could be heated with 30 candles.

'These ideas are not very complicated,' Meinhard insists - though designing the ducts and ventilation systems 'requires a bit of thinking'. The proof, he says, is in the economics. While a passive house costs 10 per cent more to build, it reduces energy loss - and utility bills - by a staggering 90 per cent.

In Freiburg, passive houses like this are relatively few, but energy-saving houses are the norm. Elsewhere in Germany, the law states that every new house built must waste no more than 75kWh/m2 per year (roughly a quarter of the energy lost from a typical Victorian house in Britain) but the specification in Freiburg is radically lower. 'It used to be 65kWh per year,' says Meinhard, 'but we are now discussing a new Freiburg law of 55, 50 or even 40kWh.'

It is part of Freiburg's unrelenting quest to be one of the greenest cities in the world, helped by the (uncomfortable) fact that it was flattened by Allied bombers in the Second World War and rebuilt on enlightened, energy-saving principles. Now, as Gordon Brown announces plans to build 10 new eco towns in Britain - in places such as Oakington in Cambridgeshire, and Long Marston, near Stratford-upon-Avon - perhaps it is time to learn from the city we destroyed.

'We always compete against Munster as the most ecological town,' says Claudia Duppe, a lecturer and resident of Freiburg's Rieselfeld quarter, 'whether it is the length of the cycle paths, the number of people cycling to work, or the amount of solar panels on the roofs.' Over a glass of local wine, she tells me about her life. As well as living in a passive house, she cycles everywhere ('the cycle routes are brilliant') or takes the tram - a cheap, fast mode of transport that makes car ownership unnecessary. 'We don't own one,' Claudia says, 'but we paid €600 to join a car-sharing club.' She only hires a car for 'big loads' when shopping, or 'to go skiing in the mountains'.

Like all good Germans, Claudia recycles - and her food waste is collected for composting. With her partner Thomas Beyer, a physicist, she has chosen the greenest education possible for her two-year-old daughter, Helen. 'She goes to a forest kindergarten a short cycle ride from here,' says Claudia. 'The children play outdoors for three-and-a-half hours a day - whether it is rain, hail or snow. When Helen started in November, it was -15C.'

I ask how Helen benefits from such a hardy education. 'It's a different way of playing,' says Claudia, explaining how the Abenteuerbaustelle ('adventure site') combines elements of Montessori teaching with ideas from Rudolf Steiner. 'They forbid any toys, so the children play with sticks and leaves. Each day, they take what the forest offers. By now, lots of things are in bloom; they can open tiny, brown-crusted buds and there is something green inside. They slow down, they are themselves, they live with the cycle of nature ...'

It sounds extreme, but Rieselfeld is a fairly extreme place. I take a tour with Andreas Roessler, a representative of the Rieselfeld Citizens' Association who has lived here since the pioneering days of 1996. With his shaved head, bomber jacket and shades, he looks every bit the fortysomething communard.

'Rents were too high in the Nineties,' he explains, 'and we had a lot of trouble getting families into affordable housing.' Public money for social housing had dried up, and the city of Freiburg was selling off plots of land to groups of families (anything from six to 16 parties) so they could employ an architect and build their own block of flats - a way of splitting the cost of ownership and making property affordable. Roughly 40 per cent of homes in the district are privately owned and self-built like this, while 40 per cent are rented. The remaining 20 per cent is social housing funded by private investors - a deliberate formula intended to create a healthy social and economic mix.

'For me, it was an adventure,' says Andreas, who moved here with his wife and three children from a village north of Freiburg to be part of the social experiment. 'We already had a neighbourhood when we moved in,' he enthuses, 'because the families in our apartments knew each other before; we'd planned all of this for two years, and that is a very fine quality of life. Our vision was kindergartens, schools, a tram to the city, to live on the border of the city,' he adds, 'but in the beginning many things did not exist. People needed advice on how life should be, but they brought their own ideas, too.'

The result was the Rieselfeld Citizens' Association, which still holds meetings for up to 200 people in the Kultur Mediothek - a glass-and-steel community centre with solar panels on the roof in Maria-von-Rudloff-Platz, Rieselfeld's main square. With the association's help, the local 'Montessori concept' school has grown from 10 pupils to 800 - the largest in the province - while the Kultur Mediothek provides a cafe, a library, computer facilities, a film club and a counselling service for migrants. It hosts such events as a Bosnian book fair (though, according to Clement Back, who runs the centre, only nine per cent of Rieselfeld residents come from ethnic backgrounds - 'and that,' he says without irony, 'includes the French').

A more impressive example of integration can be seen at the Santa Maria Magdalena Church, a brutalist concrete structure a stone's throw from the Kultur Mediothek. Inside, the vast space is divided in two by a corridor. On one side is the Catholic church, with niches and flourishes cut into the walls to reflect a more baroque sensibility; on the other is the Protestant church - much plainer, with blank walls to assist contemplation. When both congregations peak at Christmas and Easter time, the monumental walls that divide the space are rolled back on giant casters to create a single dual-faith church. 'Many more families come to this church than in other cities,' says Andreas.

It's a brave utopian vision - but, oddly, Rieselfeld is the last place I would want to live. Its housing blocks, built to a uniform height (usually four storeys), are reminiscent of the Eastern Bloc. Because the properties are all the same age, the place lacks character and charm. On the walk to my hotel, I pass an area of pitted waste ground reserved for the last phase in Rieselfeld's development, awaiting the excavators and cranes that accompany any such work in progress. It might be 'the gateway to the Black Forest' (as one resident put it), but the quarter lacks some of the facilities you might expect of a small provincial town. At Cafe Medico, one of less than a handful of restaurants in Rieselfeld, two of the four main courses were off and the 'vegetarian curry' was an abomination: rice with a tin of apricots emptied over it, topped with a heap of overcooked Brussels sprouts. If that is quality of life, I can leave it.

In his offices at the Technisches Rathaus, a sprawling prefab complex on the other side of town, Wulf Daseking, Freiburg's chief planner, agrees that Rieselfeld is ugly. 'It was the first projest, the first test,' he says, tapping the side of his nose with a finger. What he means is that Rieselfeld was the first new area built from scratch after his appointment in 1984. The other was Vauban, the radical car-free quarter carved from an old French army base in 1998 - a shrine to colourful Le Corbusier-style architecture and sustainable living.

Before seeing Vauban, I want to know how Freiburg was created from the ashes of a medieval city levelled during the Second World War. 'The main employer here is the university,' Daseking explains, 'so these are brainy people - and when they say something, they mean it. First they said they would rebuild the city with new ideas - and they did.' The old streets were widened to take trams, the tramway became 'the backbone of the city' and the medieval centre was kept car-free. 'Then, in the Seventies,' Daseking says, 'the government in Stuttgart wanted to build a nuclear power station 40km from here.

The brainy people said, "No, we won't have it" - and when they say no, they mean no.'

With nuclear power off the agenda, Freiburg found itself with a problem: a finite amount of electricity, but a growing population. The only solution, the government said, was for the people to come up with an energy-saving plan to conserve existing resources. In the mid-Eighties, when Daseking arrived, the same spirit of public consultation was applied to the planning of Rieselfeld. First on the wish list was a tramline extension, built before residents arrived so they would not have to buy a car. Next came the idea of small plots with a high population density (the group ownership model) so people could afford to buy flats. Because the newcomers were families, 'a garden was essential for every four or five plots,' says Daseking - hence the abundance of play parks.

More enlightened still was the approach to scale. 'From the top floor of every house,' says Daseking, 'parents had to be able to shout to their children in the garden - and hear the reply. It was important to get in touch with the ground.' This limited the height of buildings. To reduce theft, small garages (for those who wanted cars) were built every two blocks, rather than large ones every five blocks. 'From every corner, you could see what was happening in your garage,' says Daseking. 'Criminality had to go down.'

On the day we are due to visit Vauban, the main street in Rieselfeld is eerily deserted and silent - even for an eco town. 'The trams are on strike,' says Doris Banzhaf, a journalist who is acting as our guide. It's a reminder of just how fragile the greenest of infrastructures can be. Luckily, Doris procures us a lift in ... no offence ... a car - owned by Lorenz Wehrle, a local architect.

On the way to Vauban, he shows us two of his projects - the school gymnasium next to Santa Maria Magdalena Church, built partly underground using timber and glass (but no steel), its barrel-shaped roof planted with grass; and a private development on the western fringes of Rieselfeld that includes a sun-filled, minimalist eco-flat straight out of Blueprint or World of Interiors.

This is the home of Rene Reiche, who runs a theatrical make-up business, his wife Sylvia (a bailiff) and their two children, Yannick (six) and Anneke (four). 'If it's green and it doesn't taste good, I don't buy it,' says Rene, when I ask if he feels socially compelled to live a model ecological life. 'Green living has to be a quality decision, not just a salving of my conscience.' He owns two cars, he admits, and is certain his neighbours are not eco purists. 'If you take a close look in the recycling bins,' he says, 'it's clear not everyone is doing it.'

In Vauban, if Rieselfeld residents are to be believed, green living is compulsory. 'It jumps in your face a little,' Claudia Duppe warned me, 'and there is a lot of social control. If you walk into the quarter with an Aldi carrier bag, it's, "Sorry, I'm not talking to you; you shop at a discount supermarket and you don't buy organic." It feels claustrophobic, because everyone expects you to behave in the same way - and of course you are not allowed to have a car.'

It's an overstatement, since Vauban residents can own a car - but they have to pay €18,000 a year to park it in one of the multistorey 'Solar Garages' on the outskirts of the quarter. On the main thoroughfare there is a speed limit of 30km per hour - and on Vauban's narrow residential streets, hemmed in by housing estates, cars can travel no faster than walking speed.

As we approach Vauban, Lorenz Wehrle tells me there is little support for a car-free system. 'It doesn't work,' he says, 'and even here, people don't really accept it. They want their neighbours not to own a car, but for them a car is important.' Some people in Vauban do own one, but don't declare it, he says, saving themselves €18,000. 'They claim it belongs to their sister,' he explains, 'or they park it in Merzhausen' - a village just outside Vauban.

He, too, talks about social control - blaming it on the high number of teachers in Vauban, who thrive on rules and discipline. Back in Rieselfeld, Doris had told me that group ownership of property in Vauban is engineered to ensure that only 'a lawyer, a doctor, middle-class types' share a block.

It's toxic stuff - but as soon as I arrive in the district a lot of myths are exploded. As Lorenz drives across the boundary, there is little sense of a transition to a car-free zone; indeed, there are more vehicles than expected, perhaps on account of the tram strike. The first resident I meet is Stefan Westphal, a freelance biologist who looks after his children - Heinrich (10) and Lennard (eight) - while his wife, Manuela Kohler, works. He admits that five per cent of Vauban residents own a car, but pretend they don't. However, he has signed a declaration saying he will never own one - thus avoiding the fee. If he cheats, or even changes his mind, 'they can take a part of our property'.

In his high-ceilinged maisonette with its disconcerting glass walkways, he talks me through the intricacies of booking a shared car online. With the tram system down and every taxi in Freiburg busy, I am relying on him to get me to my next destination. Eight of the 13 parties in his block have no car, he explains; the rest keep them in one of the Solar Garages. It's true, he says, that some enraged residents have smashed up cars left on the street - 'but they are very extreme people, and I don't think they are the majority. Most residents are just like us: academics with families, looking for quality of life.'

From his rooftop terrace, Stefan points out the arrays of blue solar panels on 50 per cent of the surrounding roofs. These 'collectors' don't heat the properties themselves, since Vauban is supplied by a small local power station, but they feed energy back into the regional grid to make their owners a modest income. At the 'Solar Settlement' (or, more prosaically, the Plus-energy Housing and Service Centre) nearby, designed by solar architect Rolf Disch, each of the 60 houses makes €6,000 a year for its inhabitants - an income guaranteed for 20 years by the German government. However, it takes up to nine years to pay for the technology. Built to passive house standards, the homes also have solar collectors capable of feeding more energy into the grid than they waste - hence the name 'plus-energy' houses.

On a pine-covered mountain overlooking Vauban, I spot a dozen giant wind turbines turning so slowly their movement is almost imperceptible. 'There's not much wind,' I quip, but Stefan corrects me. 'They're not allowed to spin any faster because of ... I forget the word in English ... der fledermaus.'

'The bats?' I suggest, and Stefan nods. 'A lot of them were killed by the blades,' he says, 'and there was lots of discussion about that.' In Vauban, I reflect, the best you can do is please some of the people some of the time.

As we leave, Stefan shows me the underground bike park for residents, packed with trailers for ferrying toddlers. 'My own bike has been stolen,' he says, refreshingly, 'probably by children or students.' In this housing complex, he says, 'there are two other biologists, a physicist and two primary-school teachers, but also a carpenter and a cop. It's a very representative group.'

Barbara Classen, another Vauban resident, is less convinced about the demographics. 'I think they [in the mayor's office] have failed to get the mix right,' she says, making me a cup of Earl Grey tea in her passive house next door to Meinhard Hansen's. 'This is quite a middle-class area, basically.'

As we go for a stroll, I can't disagree. We pass a city farm and five play areas, themed by age group and activity. On Vauban's main drag, we stand in the bright afternoon sunlight as Phillip, one of Barbara's 10-year-old twin boys, earns a few euros selling books and toys at an improvised flea market.

'This is our local Conflict Resolution Workshop,' says Barbara, without a trace of humour, 'which does a lot of work with migrants. Over here is our local baker ...' She gestures towards a shop with a sign over the door saying 'Benny's Backwaren', but adds: 'Well, he's not really a baker, he's an artist - and he doesn't bake bread, he just buys it in.' On the opposite side of Phillip's flea market is 'a co-op, for members and non-members, selling organic food'.

At 1pm, when German schools finish, Barbara and her sons (the other one is Robert) have lunch every day at SUSI - a radical housing association which Barbara describes as 'an intentional community where people live in shared houses, using co-op services.' It's pure Hackney, as far as I'm concerned, and it's no surprise to learn that Barbara (who has an English husband, David) recently moved from the east London borough to start a new life in Freiburg. I ask if she has any regrets, or any reservations about the Vauban lifestyle.

'It's pretty dense housing, like a British council estate,' she says, 'and all the 10-year-olds around here are going to be teenagers at the same time. That will be an interesting experience! Some people are very anti-car, and there have been conflicts in some streets.' There is also a stigma, she believes, in living in Freiburg's most militant green quarter. 'When you tell taxi drivers you live in Vauban, you get a reaction,' she says. 'It's like, "To be honest, I couldn't do that." They're surprised to find a normal person like me living in Vauban.'

Her main grouse, however, is that Freiburg's 'so-called Green mayor' (Dr Dieter Salomon) is failing to promote social housing and group ownership while supporting big, lucrative developments thrown up by private investors. Like many I spoke to, she sees this is a betrayal of Freiburg's more enlightened past under a committed socialist mayor. It's proof that it is political will, vision and policy, not some mysterious green sensibility, that has put Germany decades ahead of Britain in terms of sustainable living. An eco town in Oakington is a start, but there must be more to the vision than house-building.