NRM York is great – how many free museums are there that you can lose yourself in with the kids for hours.
A few highlights are things like the Royal trains where you can look at how Queen Victoria etc travelled in the past. Plus the Bullet train, the massive British made Chinese Loco, Streamliner Duchess of Hamilton.
York itself is great with loads of other things to do.
Shildon Locomotion is OK – it had the Mallard for the whole of last year and has some other interesting railway memorabilia but isn’t a patch on York. I live about 5 mins from Locomotion and when my boys were little spent seemingly every other weekend there as one of them was obsessed with trains. The Shildon Locomotion Steam gala is good as it gets some big name engines like Tornado, etc. It’s worth a trip if you are properly into railway stuff but not otherwise.
Shildon is a slightly sad town with not a lot there.