Here is an interesting quote from Martin Luther’s little work Whether Soldiers, Too, Can Be Saved.
The very fact that the sword has been instituted by God to punish the evil, protect the good, and preserve the peace is powerful and sufficient proof that war and killing along with all the things that accompany wartime and martial law have been instituted by God. What else is war but the punishment of wrong and evil? [Quoted in Charles and Demy]
My guess is that Luther is not saying that all war and violence is okay. Nor is he saying that even in a just war, all actions taken by soldiers are automatically okay. But his basic point is one that needs to be repeated. If the sword and the magistrate are “instituted by God” and “God’s servant” [Romans 13:1, 4, I Peter 2:13-14] then they cannot be ungodly by definition. They can become ungodly through sin, but it is a legitimate vocation through which a Christian can honor God and serve his fellow man. Thus Christians can be soldiers, policeman, or any other profession similar to those.