well my understanding is that the Shah himself was pursuing a nuclear weapons program and presumably that would have been with the full blessing of the US, so when the Mullahs took over, some of the plans and research etc were already in place
Actually, The Imperial government of Iran had contracts with German Siemens company in order to build at least 5 nuclear power plants in south of Iran.