In the UK:
'Loo' is perfectly polite. You could even use it with the Queen. I think the etymology is French (l'eau = water).
'Toilet' Also polite and an everyday term. Sometimes people (with sense of irony) will refer to the 'little boys room', or 'little girls room', or ask 'to use the facilities'. 'May I inspect the plumbing', some will say. A male will always raise a smile if he asks 'where can I powder my nose'?
'Bathroom' and 'restroom' are seldom, if ever, used in Britain unless you need a bath or a rest! Sometimes people will ask for the 'cloakroom' - meaning toilet. 'The John' is never used and many in Britain wouldn't even know what it meant. Although the 'Water Closet' was invented in Britain, and it is an English name, the initials WC are seldom seen in Britain, though remarkably they are often used in France.
'Lavatory' is the 'matter of fact' term that sanitary engineers would us if planning some of the public variety - 'public lavatories'. Aircraft toilets are often called 'lavatories'. I'm not sure why.
'Public convenience' (a bit dated) is the euphemism for a public lavatory.
'The Bog', is the sort of name that might be applied in a rather macho all-male environment, such at the army or the local cricket club. At school in the fifties we always called them 'the bogs'.
At the vulgar end there are others which I shall leave to the imagination.