It is difficult to say what exactly the windmills represent or why the author chose them as the target of Don Quixote's anger. There are two possible explanations for this, both of which are probably true to an extent, so it's up to the reader to choose how to balance their interpretation.
One possible explanation is that the windmills simply look like monsters.
Just then they came in sight of thirty or forty windmills that rise from that plain. And no sooner did Don Quixote see them that he said to his squire, "Fortune is guiding our affairs better than we ourselves could have wished. Do you see over yonder, friend Sancho, thirty or forty hulking giants? I intend to do battle with them and slay them. With their spoils we shall begin to be rich for this is a righteous war and the removal of so foul a brood from off the face of the earth is a service God will bless."
"What giants?" asked Sancho Panza.
"Those you see over there," replied his master, "with their long arms. Some of them have arms well nigh two leagues in length."
"Take care, sir," cried Sancho. "Those over there are not giants but windmills. Those things that seem to be their arms are sails which, when they are whirled around by the wind, turn the millstone."
— Part 1, Chapter VIII.
So it could be that Cervantes simply picked the windmills because of their foreboding look. We don't normally consider windmills to be particularly scary, but to a confused mind, they could be. With their "long arms" and tall frames, they work as caricatures of giants.
Another possible interpretation is that the windmills represent technology
, the destruction of the past, and the loss of knightly values.
One of the main themes of the novel is that Don Quixote is a relic. He lives in a world that no longer exists, desperately trying to hold on to it. Possibly it never existed at all, since Quixote's beliefs are based on romantic fiction
. Everything he sees happening in the world is judged by the knightly code that the Don sees disappearing all around. As the future closes in, as he feels the world grow colder and more evil, every representation of that turns into a "monster." So it has been argued that windmills are the face of the future: soulless machines toiling away at jobs that people used to do.