It seems to be true that they are either doing very well or very badly.
St Andrews? Elie? Lovely. Methil? Granton? Pass.
Are there examples of “it’s alright” seaside towns above some threshold size?
Eastbourne? Better end of alright, but some way short of lovely.
Hastings kind of the other end of things. A fair few problems but not hopeless/desperate.
Main difference between them being Eastbourne's proximity to other prosperous places and slightly better road/rail connection to London.
I was about to argue that I didn't think Granton was that deprived - particularly given all of the new development in that area - but I checked on the Scottish Index of Multiple Deprivations map and it does look pretty bad in places:
Different histories, reliance on different industries, quality of transport links make a huge difference.
Not even all coastal "tourist" towns are doing badly - I live near Burntisland in Fife which actually seems to be thriving, probably because of the excellent location for commuting by train into Edinburgh, combined with nice beaches, great views (of Edinburgh!)...