And why? Did the medieval kingdoms of Europe just not have the means to maintain such public buildings, or was it a cultural shift? Were there any places where public bathhouses never went out of style (Rome itself, maybe? Constantinople?)
Public baths used to be maintained by local authorities and patrons. After the Romans withdrew from a region there was often a massive power vacuum, and those who filled it had much more important things to spend money on - namely solidifying their authority to stay in power. Baths continued to be used, but were poorly maintained so that they fell into disuse, and then ruin. Another reason is that many public buildings and infrastructure in the Empire were built by army engineers - who didn't take on local apprentices. So when the armies withdrew to Italy there were very few who had the knowledge and skills to build any.
Also, and I'm not sure if this is true, I'm pretty sure that with the rise of Catholicism bath houses became associated with prostitution, drunkenness and other 'sinful' activities. It was only with the Renaissance when bath houses became popular with the elite for the same reasons the Church frowned upon them.