read the link posted by
@MarkMas above. Dressing up or dressing up and acting in caricature of stereotypes ?
It is a borderline issue. I think two key tests apply - What are the motives? and Is it intrinsically offensive?
So when I dressed up as Gus Hiddink the other day, I was not trying to offend or caricature Dutch people, and even if I was, there is really no history of prejudice or oppression there, so it does no harm.
If I were to dress up as Mr T, I would have to ask myself was I just picking a favourite TV character, or trying to say something offensive about an absurd black stereotype, asking myself whether the whole beefy, gold chains, dumb haircut vibe was a nasty caricature or a fond homage. The problem is that there is a history of race-based oppression and caricature in this case, so better to be cautious and considerate, IMHO.
There are a couple of well-known Internet examples. One is a photo of a little white American girl dressed as a geisha, which seemed to be 'cultural appropriation' to some people, but seems fine to me (apart from maybe wanting little girls to have better aspirations than geisha, but that's another question). Another was someone who dressed up in a sombrero etc, and then asked California students and Mexican market-stall people if it was offensive. The (edited selection of) students worthily said 'oh, that's terrible', but the (edited selection of) real Mexicans said, 'who give a shirt, we have other things to worry about'. But, again, it is intent that matters - a bunch of drunk white frat boys wearing ponchos and yelling 'Ole' at passing Hispanic students is definitely oppressive, but wearing a fun hat on holiday because it is very sunny seems fine.
There is also geographical relativism. An American colleague once asked me, "Do you have many Hispanics in Europe and how are they treated?" I responded that they are treated pretty well in, er, Spain." Obvio, 'Hispanic' in the US means 'brownish immigrant who speaks a funny language', but here it means
'dodgy beach waiter who is trying to get off with your teenage daughter', 'white member of the European community, with a noble heritage'.
It's a fricking minefield.