.22 WMR for coyote/large raccoon & smaller out to 150yds with the new 34-grain rounds is as accurate as you could ask for. You can shoot farther, but your scope better be set up just right.
.17hmr for anything smaller than a 'yote out to 200yds works real fine too...and I'm hearing of more & more 250-300yd shots on groundhogs.
Now the only real difference between the two is the cost of the ammo & the cost of the guns. .22 WMR is usually cheaper by about $2 a box on average & about $50-100 cheaper on the rifles.
What I truly suggest for either...is to get the Heavy Target Barrel (Bull Barrel) if you are going to shoot over 100 yds.
The really fun part is they are both fairly inexpensive rifles to buy...you can get a Marlin 982VS .22 WMR for around $229-269 (depends on what part of the country you are in) or a Marlin 917VS or VT from around $300-399. The best part is you can switch magazines back & forth depending on your shooting choice for that day, as they are interchangable
In used, you can usually find regular barrel .22wmr's for $89-200 depending on condition & accessories...
I've got a Marlin 25MN, regular barrel & pre T-900 trigger which is dead nuts out to 125 & pretty darn good out to 150, but I'm planning to upgrade the Marlin 982VS with bull barrel & T-900 trigger after I get enough High Cap magazines for my Calico's

After that a nice Marlin 917 -VS or -VT will find its way to my home. Much to be said for interchangeable magazines
Whatever you get, make sure you can trade magazines back & forth...it's too perfect a setup not to