To the previous answers, I would add only this: In The Lord of the Rings: The Return of the King, in the chapter "Homeward Bound", Gandalf and the hobbits return to The Prancing Pony, where the hobbits had first met Strider over a year earlier. Everything in Bree is different. The inn is empty, supplies of pipe-weed have been cut off, everyone seems suspicious of the group, and so on.
Butterbur the innkeeper tells our heroes that things have been very bad in Bree, and in the Shire, of late. A recent battle in Bree left 5 people dead. Robbers and highwaymen are all around. It isn't safe to travel the roads, or to be out after dark. Every door is barred at night. Law and order have broken down completely.
Recall that Butterbur had warned the hobbits, when they first came to Bree, to be wary of Strider the Ranger. He clearly didn't like the Rangers at all. But now, after all the Rangers of the North left their homeland to fight in the Battles of the Pelennor Fields and the Morannon, where at least a few of them died, Butterbur sings a different tune.
You see, we're not used to such troubles; and the Rangers have all gone away, folk tell me. I don't think we've rightly understood till now what they did for us. For there's been worse than robbers about. Wolves were howling round the fences last winter. And there's dark shapes in the woods, dreadful things that it makes the blood run cold to think of. It's been very disturbing, if you understand me.
-The Lord of the Rings, The Return of the King, Book VI, Chapter 7: "Homeward Bound"
Gandalf comforts Butterbur by telling him that the Rangers have now returned, and a king has taken the throne, and will soon restore the rule of law. Significantly, Butterbur is indeed happy to hear this. When Sam finally tells Butterbur that the new king is none other than Strider himself, the innkeeper is more shocked than happy, as you might expect.
So by Butterbur's own account, the people who had always been protected by the Rangers, but had never appreciated the Rangers, quickly came to realize how vital the Rangers had been to their well being, almost as soon as the Rangers left for a few months. It is highly unlikely that the people will ever fail to appreciate what the Rangers do for them in the future, now that they've seen what life would be like without them.
The people thought of the Rangers as dirty weirdos who carried swords around and lurked in the shadows. The people also thought of their own homelands as inherently safe and tranquil. It seemed to them, therefore, that the Rangers were the biggest possible threat to this tranquility. Why else would the Rangers walk around heavily armed at all times, if not to prey on the defenseless civilians in their peaceful homeland?
They were swiftly disavowed of this notion as soon as the Rangers left for the war in the east. Everything fell apart almost immediately. Thieves and cutthroats overran the quiet west, and wolves prowled the fences where no wolves had been seen for many years. Only then did the people realize that their peaceful, safe, and tranquil way of life was never threatened by the Rangers- in fact, quite the opposite. The peace and safety were a direct result of the Rangers' tireless efforts to protect these humble folks. They kept away thieves, murderers, wolves, wraiths, and who knows what else.
In a way, the people's suspicions about the Rangers were due to the very things that made the Rangers so noble - the Rangers never sought thanks, let alone glory or renown. They didn't protect the people because they wanted to be famous. They protected people because they were good. They kept quiet about it because all they were interested in was keeping everyone safe. When people began whispering nasty things about the Rangers, the Rangers ignored it and kept doing their jobs. They were so selfless that they were willing to protect people who feared and hated them.