There is no one message in The War of the Worlds, but several. However, for the purposes of answering this question, one could possibly whittle it down to this one: the dangers of technology. This is a recurrent theme in the works of H.G. Wells. The superior technology of the Martians is dangerous for the Earthlings because it allows the aliens to prevail in what turns out to be an embarrassingly one-sided conflict. Yet for all their advanced technology, the Martians ultimately lose, as they're wiped out by the Earth's bacteria, against which they have no defense.
Wells wants us to learn a valuable lesson from the Martians' fate. He wants us to understand that, however technologically advanced we may think we are, it's no cause for complacency. Technology can greatly enhance our lives and change them for the better. But it can also do great damage. It is often also woefully inadequate in meeting our present needs. This is the situation in which the Martians find themselves. They've developed sufficiently powerful, sophisticated technology to help them invade and subdue an entire planet. But when it comes to dealing with what to humans are harmless bacteria, they're completely helpless.