Ahmadinejad came to power after several years of George W. Bush's anti-Iran rhetoric had galvanized a conservative coalition in Iran.
Look at Orkut and Twitter: Iran is a pluralistic, wonderful country. Things like the US dropping bombs next door will tend to radicalize a country's extremists. Iran had been working to topple Saddam for decades and would have made a natural ally for the US. But the US goal was not to remove Saddam, it was to take power in the region, and so Iran (the natural power in the region) had to be an adversary.
Since then, we've seen more and more power in Iran go to the conservative faction which was on its way out before George W. Bush.
But western style democracy?? Did you completely ignore what happened during the last "election" there?