Weapons inherently aren’t evil, which is why everyone has kitchen knives. People use weapons to do evil.
The problem with building AI weapons is that eventually it will be in the hands of people who are morally bankrupt and therefore will use them to do evil.
The concern with AI weapons specifically is that if something goes wrong, they might not even be in the hands of the people at all, but pursue their own objective.