First of all, a disclaimer: I rarely if ever cosplay anything revealing but I'm totally fine with skimpy cosplay and it takes a lot to make me jump about nudity.
All the cosplayers in this entry are doing things very, very right.
...and still regret having done it.
There, some way above me, stood two girls in cosplay outfits that were essentially swimsuits if going by amount of fabric. Sadly they weren't made of lycra or any other figure-hugging material, and as the girls moved around the fabric folded in the front in a way that let you see absolutely everything there was underneath. Of which there were, clothing-wise, none. I would have had no problem with the outfits otherwise but like most people I seriously don't want to see some strangers' genitals as a convention surprise.
Wait, who are you to police my preferences? I can cosplay whoever I want, so what if the outfit is skimpy?
Skimpy cosplay is awesome! That said, it can be done well, extremely badly and everything in between. Just going by what the character wears is in most times not enough (think of all the Death Note's L, Naruto's Akatsuki and any Hetalia or One Piece cosplays you've ever seen, now think how many of them were actually good ones), and the same can be said about what they do NOT wear.
It's not always a deliberate act when a cosplayer shows too much, but what to do to minimize the chances of a wardrobe malfunction?
How to look good (almost) naked
Construction, construction and construction. Make sure well in advance that the outfit stays on. Be certain that if you have to walk through a sharknado your private bits will stay hidden.
I'll share a secret that I learned from Hui Lai Lee many years ago: two pairs of underwear and thick, skin colour tights (skin colour = as close to your own skin colour as possible). Wear the first pair, put tights over those, slip second pair over tights. Ta-dah, even if upskirt happens you won't show any more than planned!
Costume in danger of slipping away from important body parts?
* Deep and sharp necklines can benefit from actually attaching them together in the front with something see-through. There are f.ex. bra straps that would work. These can also be used to make invisible shoulder straps for otherwise strapless tops. See both Ivy cosplayers above for construction tips!
* Sock glue has saved many a cosplayer. That said, don't let that be your only helper. Construction of the actual costume is far more important than any glue.
* Wearing something underneath because fabric on fabric is less likely to slip than fabric on skin.
* Remember to have a good posture. Slouching is one of the main reasons wardrobe malfunctions happen.
* No way you could wear a bra underneath? Gonna go the full Nudist Beach Nonon? Bandaids/stickers/pasties/etc. can help hide the nips.
* Occasionally it may even look better if you make the costume a bit more covering than the original was, or use skin colour fabrics to fake some parts. Or you may even do an AU version of your character where the costume is less revealing, see Princess Poison Ivy at the bottom of this post.
The most important thing is that you try the costume on before the con. Shush I know you're still working on it the night before, it'll be enough to try wearing whatever's ready. Wear it the way you're planning to wear it and move around. You'll see what'll make you feel uncomfortable pretty soon.
You can also ask a friend to help - another person can tell you if something's showing where you can't see. Practice poses, see that nothing falls out when in action. Go to toilet just so you know you actually can. Take photos of the costume on yourself, and remember that some fabrics are totally see-through in photos taken with flash. All this makes enjoying the actual convention so much easier!
TPO - Time, Place, Occasion. There's a time, place and occasion for skimpy outfits, but make doubly sure first. A good rule of thumb would therefore be:
In a private area? Skimpy cosplay totally ok!
At a convention? Check the rules, if told to wear more at the con be prepared to do so without complaining. Some conventions allow a great deal, others don't. If it's not an actual convention at all but some other kind of a festival I'd suggest avoiding tiny costumes altogether.
At a competition? Check the rules of the competition, most times it's totally fine. However, remember that lots of photos are taken at competitions and especially the unflattering ones have a tendency for appearing on 4Chan etc.
At a public place with lots of people? Most likely no - not even in countries where public nudity is just fine, because even in those countries acceptable nudity is usually restricted to certain areas (saunas, bathing areas and so forth). If, however, you've made your outfit actually more covering than the original by f.ex. using skin colour fabrics you may be safer. Be prepared to wear more if requested, and also know you'll be stared at a lot and people may take photos of you and - again - post them wherever they want to.
At a public place that rarely has people, such as a sea shore that's not a beach? Use your own judgement here. If no one sees it no one's going to mind.
(And then I added more photos because these cosplayers were too good to be left out.)