There isn't a law to say this is bad. It's true, Iran is no friend of America but its not considered as an enemy either. Do you know how many Iranians work for big companies such as Nasa and are professors and leaders? Actually when you think about it logically either way people will die or suffer not necessarily america but iran.
No, the U.S. should not provide nuclear energy technology for Iran, because nuclear capabilities in the hands of Iranian officials is a nightmare for the United States and neighboring countries. While energy is different than providing them bombs, it is still nuclear technology, and the threat that a nuclear Iran poses cannot be taken too seriously.
There is no reason for the U.S. to provide nuclear energy technology to Iran. Iran is not our friend. They have never been and they never will be. Helping Iran in this manner is asking for trouble. We should not provide nuclear energy technology to anyone every but especially not to our enemies.