Rule 1 - what is being displaced is popular (in particular if around a long time) and the replacement is unpopular.
Think diesels replacing steam, HSTs / MU replacing locos etc
Rule 2 - some trains really were crap, unreliable heaps of junk with no go sound effects. Some early diesels like class 16,21,41 (basically all North British) ,and later 58 some DMUs / EMUs were quite awful - class 307 / 140 / 141 etc
Class 220s seem to be unpopular because they stink, both diesel & toilets, rattle & fail when wet.
Rule 3 - too many / dull locos - class 47 (duff because they failed a lot) or class 66 (too many).
Rule 4 - some really sounded good, gave a thrill or were better than the rest of similar types - class 20,37,50,52,55 and now class 68 because it looks good too - DMUs - class 123,124 or Blue Pullman, EMUs such as class 309 or 303 and 4REPs - class 430
Rule 5 - some locos gain cult status
Class 52 due to their sound & style
Class 55 due to their shear power, presence and performance. I can tell you 117mph behind Black Watch down Stoke bank in Mark 1s isn't something you forget!
HST - simply because it saved UK railways and remains the fastest diesel of all time. Before they were reigned in by H&S they'd go well over 125 and gave end to end times unmatched today.