The intentional targeting of civilians with military force, such as nuclear weapons, is prohibited by international law. In particular, the Fourth Geneva Convention forbids attacks on certain types of civilian targets, and Protocol I states that civilian objects are not acceptable military targets. (Not all states are party to Protocol I.)
The Fourth Geneva Convention and Protocol I are international legal instruments that aim to protect civilians from harm during armed conflict. They prohibit targeting civilians with military force, including nuclear weapons, and restrict attacks on specific civilian targets.