The consensus seems to be that they aren't worth building all the time, they mostly useful for their specialist slot, but there are so many more things that are worth building / rushing before them.
One interesting piece of math is that the 10% building bonus pays off after constructing buildings that would take (roughly) 9 times as long as the windmill. So if the windmill took 8 turns to construct and you spend the next 72 turns after that constructing buildings then you will have covered the initial cost of the windmill with the 10% bonus, leaving everything else as profit.
Note that this does not factor in the static hammer bonus that the windmill gives or that the 10% bonus will be providing more hammers as the number of tiles worked by the city increased (both of which would lower the number of turns required to turn a profit). It also doesn't factor in any benefit you might gain from the specialist slot and does not factor in the cost of the ongoing maintenance on the windmill.
TL;DR: Due to the 10% production bonus the number of turns until a hard-build windmill or workshop pays for itself are somewhat proportional to the number of turns it took to construct it. The multiple of turns is x9 assuming no city growth and ignoring the static hammers provided by the building, making the actual ratio certainly under x8 but probably not less than x5.