Camping is always a money saver compared to staying in hotels or lodges. The average campsite costs approximately $10-$20/night. This does vary depending on park as well as campground inside a park. Campsites in BLM/NFS etc will usually be cheaper than NPS sites.
If camping is not your style and yet you are on a budget, consider staying in towns outside/nearby the National Park. Lodging inside any park is typically more expensive with fewer amenities. Naturally the further you stay from the park, the less expensive the hotels will be but convenience will also play a role in deciding where to stay. Take into account how much mileage you will be driving to and from the park as well as through the park. Add this up to determine where the best place is to stay for your budget.
No matter where you plan to stay if it is in a hotel/lodge or a campsite, you should always plan your trip in advance and book as early as possible. Lodges and campsites inside the parks book up very quickly. Hotels outside the parks often book quickly around the more popular parks but generally you have a little more time with planning. Busy parks such as Yellowstone, you should consider making your reservations several months in advance.
Keep a watch out for early bird specials! Often the parks and towns nearby will offer specials if you visit early in the year or during "off-season" times. This is great because it is a less populated time of the year and you can save a few extra pennies.
If you do not book your hotels in advance and decide to say, "wing-it", do some drive-by's of hotels and inquire to them about room availability. If you find that multiple hotels have room availabilities, you have a chance of getting a discount. Compare the prices, visit some rooms and request at least 10% off.
If you know you will be arriving late to a hotel, call in advance and let them know. This can help avoid any confusion and ensure that they don't give your room away! This is extrememly important if you will be entering areas where choices are slim and the next down is a distance away.