CFR has an illuminating interview with Carnegie's George Perkovich:
[W]hat happened is that Jalili returned from Vienna to a place where the leadership had systematically made enemies of many in the Iranian establishment, including the speaker of the Parliament, Ali Larijani, who was the former chief nuclear negotiator and who himself has been regarded as a pretty hard-line guy. Ahmadinejad in the past had belittled him and said that he was weak, and so now was time for payback. Everybody who had been angered or frustrated or brow-beaten by Ahmadinejad turned around and dumped on him. So Mir-Hossein Mousavi, the leader of the opposition, and Mehdi Karroubi, the other leader of the opposition, as well as Larijani, all denounced the Vienna accord as a weak-kneed accommodation to the West, that it was giving away "our great patrimony." The deal actually is very good for Iran, and so the explanation for the turnaround is Iranian politics.
Perkovich basically sees no hope for productive negotiations with Iran, and advises the Obama administration to "draw the line and enforce that Iran doesn't go from the capability to making nuclear weapons." But of course the US has been drawing lines for years, to no effect.
(For more good expert opinion on Iran, check out this lucid presentation by nukes expert Matt Bunn of Harvard, who warns against the false hope that we can halt nuclear enrichment in Iran.)