In H.G Wells's War of the Worlds, the Martians are described as envious. What about earth makes them envious? And is the answer to this different between different versions of the story (ie. 2005's movie).
This is covered in the preamble to Chapter One of the original source novel by H. G. Wells.
In short, their world isn't just cold, it's cooling to the point that life is becoming unpleasant. The Martians clearly see that this trend will continue until life on the planet becomes non-viable.
Apologies for the length of the quote, but it's all quite relevant.
The secular cooling that must someday overtake our planet has already gone far indeed with our neighbour. Its physical condition is still largely a mystery, but we know now that even in its equatorial region the midday temperature barely approaches that of our coldest winter. Its air is much more attenuated than ours, its oceans have shrunk until they cover but a third of its surface, and as its slow seasons change huge snowcaps gather and melt about either pole and periodically inundate its temperate zones.
That last stage of exhaustion, which to us is still incredibly remote, has become a present-day problem for the inhabitants of Mars. The immediate pressure of necessity has brightened their intellects, enlarged their powers, and hardened their hearts. And looking across space with instruments, and intelligences such as we have scarcely dreamed of, they see, at its nearest distance only 35,000,000 of miles sunward of them, a morning star of hope, our own warmer planet, green with vegetation and grey with water, with a cloudy atmosphere eloquent of fertility, with glimpses through its drifting cloud wisps of broad stretches of populous country and narrow, navy-crowded seas.
There also seems to be a philosophical element at play, with the Martians feeling that it's their right to fight for the possession of the Earth if they so choose. Also, that we (inferior creatures) should be exterminated simply due to our fundamental inferiority.
The intellectual side of man already admits that life is an incessant struggle for existence, and it would seem that this too is the belief of the minds upon Mars. Their world is far gone in its cooling and this world is still crowded with life, but crowded only with what they regard as inferior animals. To carry warfare sunward is, indeed, their only escape from the destruction that, generation after generation, creeps upon them.
As regards the film(s), radio play and TV adaptations, they all start semi-identically, referencing the Martian's "envious eyes" but none seem to go into any greater detail regarding their long-term motivation.
While the other answers are what I'd actually answer, too. Here's
What a teacher would want to hear:
H.G. Wells is being allegoric. The Martians are an allegory to Imperialist Europeans. Their reason "envy" is critique directed at colonization of Africa. Envy being one of the classical sins, is morally judged as a negative trait. The Martians' judgment of humans as inferior is equivalent to reasoning of slave traders of the time. The asymmetric Martian-human war is mirroring European conquest against then less-developed Africa.
Your question then becomes:
Why would Europeans want to colonize Africa?
For resources and to solve their own problems of
- population density
There were too many people to be sustained by their current environment. Just like the Martians couldn't survive on Mars much longer.
- "insufficient" cheap labor in other colonies
This would be America in the real world. It's a bit of a stretch but the Martians used captured humans to fertilize the land in their own cruel way. How many slaves died working in the fields?
- societal gap in wealth
Simple men could make a "fortune" (or at least gain some land) when going into the colonies. This promise combined with risks due to population density reduced the societal pressure to have riots in imperialist countries. This is one of the few points not addressed in the story: The Martians are displayed as homogenous people, who don't turn on each other. Maybe we can learn from them in that regard?
Well, and hubris, of course.
H. G. Wells suggests the idea of a critique against colonialism in the following passage:
And before we judge them [the Martians] too harshly, we must remember what ruthless and utter destruction our own species has wrought, not only upon animals, such as the vanished Bison and the Dodo, but upon its own inferior races. The Tasmanians, in spite of their human likeness, were entirely swept out of existence in a war of extermination waged by European immigrants, in the space of fifty years. Are we such apostles of mercy as to complain if the Martians warred in the same spirit?
— Chapter I, "The Eve of the War" (taken from: https://en.wikipedia.org/wiki/The_War_of_the_Worlds#Colonialism_and_imperialism)
The ending of the story unveils its moral: Germs, the simplest known life form defeat the invaders revealing their hubris. They should not have thought too low of "inferior" life forms. As well we humans should not consider each other to be of less value.
It wouldn't make a good story, if the Martians didn't attack.
Their world is too cold
And we men, the creatures who inhabit this earth, must be to them at least as alien and lowly as are the monkeys and lemurs to us. The intellectual side of man already admits that life is an incessant struggle for existence, and it would seem that this too is the belief of the minds upon Mars. Their world is far gone in its cooling and this world is still crowded with life, but crowded only with what they regard as inferior animals. To carry warfare sunward is, indeed, their only escape from the destruction that, generation after generation, creeps upon them.
Mars has grown too cold for the Martians to continue living there any longer, and so they must migrate to a world closer to the sun in order to survive.
Given that the actual temperature of Mars is about -55 degrees Celsius on average, this does not seem too surprising (though estimates of Mars's temperature were unreliable when The War of the Worlds was written) .