The cameras had special lenses that use infrared light (IR) to see through some types of clothing. It primarily works on dark colored, thin clothing – like swimsuits. The main factor is how well the fabric absorbs IR light waves. It’s not for regular digicams, but rather for camcorders with a IR night vision mode, and the resolution is low.
Sony recalled the camcorders when they found out about this, but the night vision camcorders that they subsequently released can still be modified to give back the see-through-clothing functionality. A lot of people have abused this technology for nefarious purposes. You can read more about that in this ABC article.