First, the Death Star is a bit misunderstood. It is primarily a tool of domestic politics rather than warfare, and should be compared to alternative means of suppressing the population of a galaxy. Second, as a weapon of war, it should be compared to alternative uses of scarce defense resources. Understood properly, the Death Star is not worth it.
Also note useful examination of use of pre-historic weapons vs fighting equipment of a star-faring civilisation.