A number of options depending on your ability to deal with heat (as Budapest can be warm in August) and what the kids want to do.
- Pecs, about a 3 hour train ride southwest of town. Roman ruins, ancient mosques, great town square, great cathedral, shopping and pedestrian zones. Dryer climate.
- Eger, the wine town northeast of Budapest about 2 hours on the train. Fortress on a hill, minaret, great town square, wine, shopping, wine cellars. A little higher altitude so maybe a bit cooler.
- Lillafüred, a little more challenging, but …. You take a train to Miskolc (about 2.5 hours), then a tram across town to a great old castle, then the Forest Railway to Lillafüred where there are caves a great old palace hotel, nature, etc. A little higher elevation so maybe a bit cooler.
- Lake Balaton, I prefer Tihany. Great town with craft shops, food, stunning views of the lake, ancient abbey with crypts, etc. About 2 hours on the train to Balatonfüred then a taxi about 15 minutes to Tihany. Warm.
- Vienna, about 2.5 hours by train. Warm
- Gyor and the Archabbey & winery at Pannonhalma. About 1.5 hours by train. Warm
Since there are four of you to prorate out the cost, you might spring for a private driver for the trip back to Budapest. That way you can make some stops and see a little more. Check with this guy for prices: http://silverwings.hu/
Oh, and don't forget to take the kids to the Budapest Zoo. Pretty impressive.