Which is the greater threat, the use of nuclear weapons in war or the peaceful use of nuclear energy?
There is no way to answer this question objectively. Both pose threats, though the threats are of different types. There is no objective way to measure the relative severity of these threats. Let us look at how these threats are different.
The peaceful use of nuclear energy is dangerous mainly because of the possibility of accidents. We have seen relatively recently in Fukushima, Japan that nuclear energy can be dangerous. These sorts of accidents may or may not happen, but they can be very dangerous when they do. We can also argue that peaceful nuclear energy is dangerous because of the possibility that some radioactive material will somehow fall into the hands of terrorists.
If a nuclear war were to happen, the damage would be unbelievable. Multiple cities would surely be destroyed by nuclear exchanges. This damage would be far greater than anything that is likely to happen in a nuclear energy accident. However, it is very unlikely that nuclear war will ever occur. Everyone knows that nuclear war would be so devastating that no one is very likely to start such a war.
Thus, we have two different types of threats. Nuclear power is a relatively low-level threat, but one that is more likely to happen. Nuclear war would be the most serious threat possible, but is very unlikely. There is no way to objectively determine which threat is greater.