I prefer both as each season have their own advantage
Summer and winter are both great! (and other seasons of course)
I think winter is best in places with snow (like Scandinavia or Austria/Switzerland) or in southern Europe if you want to escape the winter cold. On a winterrail journey, I would definitely include the Bernina Railway, as you get best of both worlds: snowy landscapes in Switzerland and acceptable temperatures in Italy.
I like fall the best in places with a lot of deciduous forests, like Slovakia and Germany.
For spring and summer it doesn't matter that much where you go, because every place is so much different. But even still, in winter you can have a great time in cities, although you can expect more railfall for example.