Suggestions as to where to stay for 4-5 days in Germany or Austria in late July/Early Aug for a family of 6 persons (so a family suite or 2 triple rooms)-cost under 300 euros a night. We would fly into either Frankfurt or Munich. We would like to possibly stay in a smaller town in/near mountains--or easy access for relaxing, light hiking, alpine activities, but also want an easy day trip to see one or more Castles. Easy public transportation would be a big plus, but not a deal-killer, assuming not a lot of winding mountainous driving.
I've been all along the foot of the Alps in southern Bavaria, and except for the switchbacks out of Bad Hindelang, near Sonthofen, I don't remember a lot of winding mountainous roads. Four areas I would suggest: Berchtesgaden. Eagles Nest, Königssee, hiking on the Watzmann. The area south of Holzkirchen. The lakes (See) of Kochelsee, Tegernsee, and Schliersee. There is a system of trains connecting the towns (buses too). If you go down to Osterhofen, you can take the cable car (Seilbahn) up to the top of the Wendelstein. Oberammergau. A good base for visits to Ludwig's castle at Hohenschwangau, Linderhof, and Germisch-Partenkirchen. Good bus service to all three places. The Iller Valley of the Oberallgäu. Stay in Oberstdorf. There is excellent hiking in the Kleinwalsertal and a daily bus to Hohenschwangau (and you get to ride (not drive) up those switchbacks out of Bad Hindelang). For the size of your party, you should look for a Ferienwohnung (vacation apartment). They'll have a sleep-in living room, kitchen, and some bedrooms.
Prien am Chiemsee lies at the foot of the German Alps mid-way between Salzburg and Munich - it's a great spot on Chiemsee (lake) with lots of recreational opportunities and ideally located for outings by train to Salzburg (castles), Munich, Berchtesgaden (mountains) and nearby Aschau. Prien tourist office website (check out accommodations here.) A major destination here is Herrenchiemsee palace on an island in Chiemsee (lake) Salzurg Castles In Aschau is the Kampenwand gondola lift. Use the Bayern ticket for your outings.
If you don't want to travel very far once you arrive in Frankfurt, the Odenwald just to the south is a hiker's paradise. It's a region of forested low mountains criss-crossed by several thousand kilometers of hiking trails. And the region contains a few dozen castles, both preserved and in various states of ruin. Heppenheim, Bensheim, Darmstadt, Michelstadt, Erbach, Lindenfels, Weinheim, Heidelberg, Eberbach, Hirschhorn or Mosbach would all make good bases. For hiking, you would need a rental car. The Taunus mountains north of Frankfurt also offer plenty of good day hikes, although there aren't as many castles within the mountains. Plenty in the immediate vicinity, however. In addition to the recommendations given previously in the Alps (and another shout out to Oberstdorf), Garmisch-Partenkirchen is also a good choice. It's the transit hub for the region, so you wouldn't need to rent a car. No matter where you stay in town, there's hiking trail head somewhere within walking distance.