Is it legal to camp in unmarked areas in United States national forests? I'm specifically thinking of Utah/Idaho if state makes any difference.
Backcountry camping in US national forests is free. There is the option of using a fee based campground as well. If you end up going backcountry camping, set up a good distance from established hiking trails and water sources(for animals). Bury human waste 6 inches below and pack out all trash.
For the US national forests you can find most of what you will need on the US Forest Service website.
Specifically for Uintah-Wasatch-Cache you can use this link and it will have the information about the various camping possibilities. From Cabins, Group, RV as well as wilderness camping including the required information on camping regulations.
Camping regulations will vary according to area and land designation (wilderness, travel restricted, winter closures, etc...). Always check with the local Ranger District to get the details.
That being said, there are a few general principles:
For the most part, you are allowed to "dispersed camp" in any United States National Forest unless there is a specific regulation prohibiting it (special use area, conservation area, etc.)
What this means is, you can pull your car off a forest service wherever there is an established turn-out and camp. You can not, however, drive off into an undisturbed area and set up camp.
Camping is usually limited to 14 days, after which you are required to move at least 2 miles away.
Dispersed camping is free.
Back-country (foot) Camping
If you are hiking in, you have even more options. Again, in general, you are free to set up wherever you like, however some areas might have regulations in effect encouraging visitors to practice "Leave No Trace". For example, while it is ALWAYS a bad idea to camp within 100 feet of a stream or lake, in some forests it may be illegal.
Also, as good practice, it is better to camp in areas that already impacted -- unless that impact is minor, and stands a chance of full recovery if you do not camp there. See this discussion for more information.
For more discussion about the different public lands and what is allowed, see this question.
Camping regulations vary significantly between different national forests. The only way to know what is allowed is to ask each forest you plan to visit.
For example, in the White Mountain National Forest of NH, car camping is highly restricted. It is only allowed in designated areas and along a very limited few roads. The designated sites are mostly in fee-based camps where you get a parking spot, grill, flat place for the tent, trash cans and restrooms nearby, etc. There are a limited number of free spots along a mostly obscure dead-end road that are just a place to pull out. These are termed "undeveloped" and are strictly first-come first-served. Don't show up Friday or Saturday evening during the summer or fall and expect to find a spot.
Backcountry camping is allowed in the WMNF more freely, but there are restrictions, like you must be 1/4 mile from the trail, group limits in the wilderness areas, and various exclusion zones. Penalties for getting caught where you're not supposed to be can be stiff.
Part of the reason the WMNF has to be so restrictive is because they get a lot of visitors relative to the land area. It's only 2-3 hours drive from Boston and other populated areas, and the only area for a long ways with tall enough mountains for the tops to be above tree line. There are also a lot of roads thru the area that people have to use for ordinary purposes having nothing to do with the forest. The restrictive rules are to give people access but to keep the place from getting destroyed. In my opinion, they do a pretty good job of ballancing the demands, which also include commercial ski and lumber operations.
In contrast, the much larger national forests in much less densly populated areas can afford to be more liberal. The first time I visited the Apache-Sitgreaves National Forest in AZ, I went to the ranger station to ask about camping regulations as my first order of business. They looked at me kindof funny and it took a while for them to comprehend the question, since you are pretty much allowed to camp anywhere and nobody ever asks them. Eventually one of them actually said "just don't camp in the middle of a road".
The combined contiguous area of the Kaibab, Coconino, Apach-Sitgreaves, Tonto, and Gila National Forests exceeds that of Massachusetts, but far fewer people live in the vicinity. The rules are lax because they can afford to be. Everyone can camp mostly where they want to and it's not causing a problem, so no need to regulate.
I don't have experience with the forests you mention in ID. But, what I'm trying to point out is that you shouldn't assume anything. Ask. Probably the rules will be more on the lax side considering size, remoteness, and nearby population, but unless you ask you can't be sure. There will probably be some local specific restrictions that you need to know about, even if most areas are generally open. Some restrictions can also vary be season, weather, and perceived threat of fire, so can change on the fly. Again, you have to ask.