Karmelj -
Generally speaking, most western states don't have many camping facilities at their fairgrounds - other than for self-contained units during county fairs - because there is so much camping on public lands nearby. Also, it would compete with commercial campgrounds in town. If you want to camp in town it will usually cost - or you can find CouchSurfing hosts.
There are three main public lands agencies - the National Park Service - parks, the U.S. Forest Service - mountains, and the BLM (Bureau of Land Management) - desert. Random camping - i.e. free anywhere - is usually permitted by the USFS and the BLM - but NOT by the NPS. You just have to be 1/2 mile from a developed site.
The quality of your trip will be much enhanced if you try to avoid town hopping every night. Yes, it's nice to have all the conveniences of town - but the West is where you have all that spectacular nature. All you have to do is make sure to pick up supplies in the last town you pass thru. Also, a basic water filter gives you so many more random camping options.
As you get into the Plains states, you will find many more towns that permit camping at the fairgrounds or a town park. The Northern Tier maps will cover camping up to Glacier. Along US 89, there's camping in Choteau, you can ask to camp behind the Warm Springs (usually if you buy a soak ticket they will let you pitch a tent for free), you can beg a spot at the Livingston fairgrounds if you catch the caretaker and there's nothing else going on.
As you get into the Plains states there is very little federal public land - after the Black Hills if you're going thru S.D. You might consider state fishing access sites on water bodies and wildlife management areas - all searchable via the web. WORD OF WARNING - Do not presume to pitch a tent on reservations unless clearly permitted by someone. Native peoples do not take kindly to trespassers. I have always been treated kindly on many, many reservations - but I do not presume and I do not stealth camp. Common courtesy.
J
PS - White River, SD does have camping at the county fairgrounds,
It is a comfortable day's ride from Badlands NP campground at Interior.