There is no law (in England and Wales) that says you can't be topless, or even naked. In Scotland I believe it can cause a 'breach of the peace,' I don't know about Northern Ireland.
However, under the Sexual Offences Act 2003 if you intend to cause distress or upset people by being naked then you could be fined or even imprisoned (though I believe this has been taken to only apply if someone actually was distressed).
Under common law, you can be guilty of 'outraging public decency' for just about anything and oddly enough this is perhaps more likely if you are in your underwear than if you are totally naked, since the liberty of total nakedness is implied in the Act but the issue of exposing underwear is still a grey area: in practice, I doubt that a judge would rule a distinction between them.
So you are at legal liberty to strip down so long as you do not intend negatively affecting others. If you're just doing it for yourself, you (probably) have the freedom to be as dressed or undressed as you like. If others find it offensive, sexy, disgusting, distracting, unsocial, that is their problem, not yours.