You'd need a continuation of the more decadent Georgian period, displacing the much more staid, morally upright Victorian attitudes which arrived with Vicky's reign. Perhaps have George IV live longer and be a more popular king, legitimising the almost-anything-goes attitudes of his time. The crusade to abolish slavery might have to fail, as those who aggitated against it were often those of the most morally righteous disposition. Knock them back, and Britain becomes a much less moral society where the pursuit of profit remains more important than the suffering of fellow men. Perhaps with less emphasis on moral rectitude amongst the upper and middle classes, there would be more acceptance of a lady dressing in such a manner.
I do think that whatever happens, however, the heir to the throne wearing a bikini in the early 19th century is going to cause a LOT of raised eyebrows. I can guarantee, however, that once Princess Victoria is seen in a bikini, every lady of wealth will want one, whatever the scandal mongers may say.