My first recomendation would be St Andrew’s. It is more than just a golf course – it is the site of the oldest university and has a beautiful coast line, a midevil castle and the remains of St Andrews Cathedral are very impressive. http://www.visitstandrews.com/do/ You take the train to Leuchars where you can catch a bus.
We also wanted to see Scotland’s Secret Bunker (which is near St Andrew’s) but haven’t made it there. https://www.visitscotland.com/info/see-do/scotlands-secret-bunker-p254671
Stirling Castle is also reportedly a good castle to visit (if you’re into seeing Castles which we aren’t so much which is why I haven’t been there – we’d rather be outside) and an easy day trip by train. We have been to the Wallace Monument which is way up on a hill and a cool place to see the views at sunset. https://www.visitscotland.com/destinations-maps/stirling/
Perth is a lovely town on the River Tay. We stayed there for a several of days one time because my husband needed to work. It has a pub with a great selection of whisky – “The Bothy”!! We went to Dundee and saw the RRS Discovery – Captain Scott’s famous polar exploration ship http://www.rrsdiscovery.com/
The Kelpies and Falkirk Wheel are closer to Glasgow but easy to get to from Edinburgh also. #2 & 3 in this site: https://www.timeout.com/edinburgh/things-to-do/seven-of-the-best-day-trips-outside-of-edinburgh. Northt Berwick is #5 on that site, I haven’t been there but I have been to Berwick-upon-Tweed which has switched back and forth between Scotland and England. Either of those would be good coastal places to visit.
From Trip Advisor: North Berwick 30 mins in the train east of Edinburgh. Lovely small town and has the Scottish Sea Life centre which has camera’s out on the near by islands so you can watch what is going on so no problem with bad weather. Dunbar birth place of John Muir is only a 15 min bus ride away and is also an interesting small town & harbour.
Ha this lady agrees with me on the top 3: http://www.goeuro.co.uk/blog/day-trips-from-edinburgh/
Of course there are also numerous golf courses and distilleries (Glenkinchie, Glenmorangie, Benriach). 🙂