I'd recommend the last two weeks of August. Many schools begin in August in the western states.
For your first stop in Rocky Mtn. in August reservations are recommended if you want to stay in the park itself. Rocky is close to a large population center so it's really crowded. If you want to stay in Estes private parks, getting there early morning would probably get you a site without reservations. Moraine or Glacier Basin (we volunteered there) are very nice campgrounds in the park with great views and close to nice hiking - some easy. They're also close to Estes for trinket shopping. :) 3-4 days would be ideal.
Grand Teton Nat'l Park is altogether different than Yellowstone and it's too far to travel back and forth. It's like a miniature Alps. Plan on staying in the Tetons at least 2-3 nights. If you can, take a gentle guided float trip through the park on the Snake River and you just might see moose in the river with you. The hikes are gorgeous and there are many nice easy ones. Colter Bay campground and Gros Ventre campground (our favorite) in the park itself each have 300 unreservable sites. You'll definitely get a site without reservations, especially if you stay nearby the previous night and pull in during the morning. Never try to get a site in the national parks by pulling in the afternoons. It's possible, but more difficult.
Yellowstone isn't noted for day hiking for most folks because the park requires a lot of driving although you'll be doing a lot of walking just to see the geysers/mud pots, etc. We've always had good luck getting a site at Mammoth campground even with our 40' motorhome. Again, get there early morning. Plan at least 3-4 days in Yellowstone.
Have fun planning!