I think it depends upon your tactics. I tend to use them if I have a city that doesn't have a great many production tiles and only if have electricity and have no intention of using universal suffrage. Even then, they are more useful if you play with the financial trait.
From a production point of view you will get more hammers and food. But the money you get from towns on floodplains knocks the stuffing out of watermills.
Windmills are only really good if you're running environmentalism. Late game, switch to enviromentalism and spam all the hill tiles with them. Then replace some of those farms with cottages, in preparation for running a ce.
Why?
You'll be able to build power plants with less health penalties so you won't be penalised as much in terms of production. Towns will produce hammers with universal suffrage.
So, you replace two of your mines with windmills then build a town over one of your farms.
two hills with mines and one flood plain farmed will give you a maximum of:
8 production (with railroads) and six food (with biology). Six production without railroads and five food without biology.
two windmills with a cottage will give you (with environmentalism and universal suffrage and free speech):
4 production, six food and 11 commerce, increasing to 17 commerce and five production once it's a town. So you loose 3 production but gain 17 commerce.
However, without environmentalism and uni suffrage and free speech.
4 production and 11 commerce.
without electricity, replaceable parts, printing press :
2 production and six commerce.
The above example considers grasslands and grassland hills. I'm not entirely sure how this changes if the hills are railroaded but I don't think railroads improve windmill production.
As such, building windmills only makes sense once you have the technologies and civics in place to take advantage of them.
Mines and farms give an optimum resource value of 14.
windmills and town provide a optimum resource value of 27.
And as such can represent much better use of the land.
