This thread raises a number of legal issues. Here’s my two pence on three topics—admittedly a simplification.
The laws here vary by country and, in the US, by state, but they’re reasonably consistent around the “free world.” If something’s different where you live, feel free to share.
Privacy: It is generally against the law to make a recording (audio, video, and/or still photo) of a person who has a “reasonable expectation of privacy.” That phrase can be subject to interpretation, but some situations are clear: Someone in a locked toilet stall clearly has an expectation of privacy; someone walking down a public sidewalk doesn’t. Laying out on a public nude beach? Probably no expectation of privacy, but IMHO it’s rude to photograph someone there. A hookup you invite into your bedroom also has an expectation of privacy, so keep that hidden video camera off. Note that the privacy rules here don't require that there be nudity or sexual activity: A person in a locked hotel room with the curtains closed has an expectation of privacy even if they are fully clothed while reading newspaper. Violations here are generally misdemeanors, which can be punishable by 6-12 months in prison and or $1000 in fines.
Consent to Distribute: Even if another party knows that you are viewing or downloading a nude or sexual image/video of them, it isn’t legal to further distribute that media to other people unless there is consent from the person(s) being recorded. The law gets quite technical here, but this applies to “bait” material and other private interactions, like Snapchat. (Some jurisdictions include these laws under a heading of “Revenge Porn,” even if there wasn’t a “revenge” motivation. Violations here are also generally misdemeanors.
Under-age porn: Even though the age of consent to sexual relations varies around the world (and from US state to US state), there’s a fairly universal prohibition of media showing nudity or sexual activity of a person under 18. (Definitions of nudity can vary—in some places, showing buttocks are considered nudity, in other places, not. Some jurisdictions consider an obvious erection underneath clothing to be nudity.) Be very, very careful here: While the maxim of the law in most “free world” jurisdictions is that one is innocent of a crime unless proven guilty beyond a reasonable doubt, prosecutors, judges, and/or juries often unconsciously shift the burden of proof to the defendant—you prove that the subject was 18+, or we consider you guilty. Violations of under-age porn law is generally a felony, which can involve multiple years in prison, public sex offender registry, etc. Even if you’re attracted to younger guys, use the maxim “if in doubt, throw it out.” The graphic from @cp2000 is a good general guide, but everyone’s different. Consider also that there’s no way to be certain about the age of a toilet stall or “bait” video subject. Most 12 year olds can operate a mobile phone camera. I’ve seen toilet stall spy videos where I suspect that the subject is a minor.
Sorry for being verbose; I dwell in a world where a document called a “brief” can be hundreds of pages long.
Disclaimer: This represents my own opinion, not that of this website. Do not consider this formal legal advice for any situation in which you find yourself. If you need such advice, contact a licensed attorney.