Sometimes I do think a preemptive war is necessary, if there is good evidence that the other side is going to attack. You can get an enemy off guard if you are the first to attack. Surprise is a good advantage. You can also ally with other countries in a show of overwhelming force to stop an aggressor. At that stage, I would also try diplomacy to prevent any kind of war from starting.
War is never necessary. In every group of people there will be some who do not feel obliged to live by the communities rules. In the past we have relied on superior force to attempt to solve difficult social issues. As long as we feel the need to coerce another human being to conform to our established norms, we will have war. If we can ever get to the concept of the fundamental value of each and every human being, that we all have a right to life, liberty and the pursuit of happiness then all war will be a bad memory. I have been told that the side effects of child raising is the source of much of the war-norms mentality. Perhaps a solution might lie in the direction of "developing in the child a taste for the way one might go." If our educational practices were controlled by the thrill of discovery and learning, we might be able to produce a society less incclined to savage or self-destructive behaviour.
This depends greatly on the circumstances. There are certainly times when preemptive wars would have been, in hindsight, a good thing. Other times, there have been preemptive wars waged that do not look good in retrospect.
Perhaps the best example of a preemptive war that would have been a good thing can be seen in the 1930s. If France or England had waged a preemptive war against Hitler when Hitler remilitarized the Rhineland (for example), WWII and the Holocaust might well have been avoided. In this case, it seems clear that a preemptive war was necessary.
However, it is not always easy to tell when such wars are necessary. The best example of that is the US invasion of Iraq in 2003. The war seemed necessary to many in the US at the time, but it proved not to have been so vital.
Sadly, we cannot know beforehand whether a given situation calls for a preemptive war.