Using Messages
1. Be Subtle
A blatant, poorly-concealed message can easily turn readers off, sometimes even if they agree with it. Most people won't tolerate their views being bashed mercilessly in a story, no matter how good the rest of it is.
Here's an example. Your three heroes are all tall, slim, smart, kind, and attractive. Your two villains are short, deformed, ugly, cruel, obese, and stupid. Now, that by itself is a shining example of terrible writing, but is there anything you can do to make it worse?
Why of course. Just make the heroes vegans and the villains meat eaters, or atheists and Christians, or pro-life and pro-choice. Let me tell you. the second that all becomes apparent, there will be a sudden thump. That thump will be the majority of your readers throwing the book against the wall in disgust. Unless you are writing for a very targeted audience (ex. PETA2, your church group, your "go green" club), do not do this. Even then, be careful.
Now, nothing is wrong with making your heroes vegans, atheists, or pro-lifers, or making your villains meat eaters, Christians, or pro-choicers. Just don't portray your heroes as perfect angels and don't portray your villains as pure evil. Not only is it bad writing, it is also extremely pretentious and arrogant.
2. Be Fair
Let's say your heroes are trying to stop a mining operation in an old-growth forest area. They are worried about damage to the environment and about surface and groundwater contamination. Okay. I can relate to that. The villain(s) would likely be the mine supporters in the community or the CEO of the mining company.
There has been an ongoing issue in my community very similar to this. I have read the opinions of those who support the mine. Are they are money-grubbing fiends who don't care one wit about the environment or public health?
No. They are not. So neither should their fictional versions be.
The mine supporters argue that the mine would bring jobs and money into the community, which is true. It would. Each side has valid arguments. For each person, it all comes down to which side's points they think are more valid.