The classic day-trip formula is similar in most countries: within one to two hours of the capital you will typically find a historic former capital or castle town, a mountain or lake escape, a coastal or riverside town, and a major religious or archaeological site. Tourism board websites usually have a dedicated day trips page, and rail operators often promote discounted excursion fares to exactly these places.
As a rule of thumb, anything under ninety minutes each way by train makes a comfortable day trip; two hours is doable for something special; beyond that you are better off staying overnight. Trains beat driving for popular spots since parking and traffic eat your day, but a rental car wins for scattered rural sights.
Go on a weekday if you can, because locals flood the favourite excursions on weekends. Check return timetables before you set out, as rural lines can stop running surprisingly early, and buy timed-entry tickets in advance.