Start planning NOW- we always make our reservation 10-12 months in advance when staying in the park. They have a really relaxed reservation policy so it's easy to make reservations & cancel them later if plans change. I highly recommend staying in the park. It's not crazy expensive & will save you HOURS of driving time. The road through the park is called the Grand Loop- take a look at the map & plan your days around where you will be staying each night. We usually come in through Jackson Hole & stay the 1st night at Old Faithful Lodge, the second night at Mammoth & the 3rd night at the Lake Lodge/Cabins. All of these locations have restaurants on site. 4th of July week is the busiest week of the summer but basically since the park isn't open to through traffic in the winter the whole summer is quite busy, but manageable. We like to spend a day in Jackson Hole on the way up and a day in Cody on the way home. There are a couple of fun museums, etc., in Cody that the kids would probably enjoy. More time could certainly be spend in the park but we can never get away from our business for more than 5 -6 days so the park has to be done in 3. There are also little horseback riding trips & things like that that can be planned in and around the park which may be fun with the kids. Have fun!
If you plan on staying inside the park, definately plan now. The only time I stayed in the park, we camped, but I know the park hotels fill up quickly. I've never actually even stayed nearby outside the park, mostly because I always just went for the day since I lived in Bozeman. So I can't recommend anything for lodging. But you'll want to stay either in the park or just outside. One option may be renting a house. I've totally scoped out this one: www.vrbo.com/139311 I have visited the park right before Memorial Day, and there was snow on some trails (despite the sunshine and the fact that I was wearing capris). We also visited in September after Labor Day and crowds weren't bad. It was actually a great time to visit. With kids that might be more difficult since you'll have to contend with school. It is busiest between Memorial Day and Labor Day, obviously.
We stayed outside the park and enjoyed seeing the towns and sights outside of Yellowstone in the evenings. We stayed in the Colter Bay Cabins, West Yellowstone, and Gardiner. It worked out perfectly. All of those places are just outside the Yellowstone gates and we didn't have to drive much at all. We booked a month or two in advance and it was limited.