Scores of train passengers have been evacuated after some services were halted on what was the hottest day of the year in the UK so far.