Nuclear weapons violate international humanitarian law.
Nuclear weapons are indiscriminate in their effects. They cannot distinguish between military and civilian targets, or between combatants and non-combatants. This is considered a violation of International Humanitarian Law (IHL), according to both the Geneva Conventions and the International Court of Justice (ICJ).
For further information, see page 15 of https://tridentploughshares.org/wp-content/uploads/2013/01/6.pdf