That's actually a very complex question. Putting aside prostitution and focusing on porn, America gradually lost its (literal) puritanical identity gradually as the 1700s arrived. Immigration and changing attitudes resulted in artistic presentations of porn in various paper forms being brought over, as noted by the previous post chiefly by the French.
Technology resulted in the proliferation of actual photographs in the late 1800s, and peep show boxes wherein coins were inserted for each viewing were all the rage in the early 1900s. You also have to point to Vaudeville shows and acts. Relatively tame by today's standards and lots of times wouldn't feature actual nudity, but enough to get people going back then.
Government regulations resulted in certain standards outside of illegal showings and sales, but the audience existed and technology accommodated it. As it was accessible and thus increasingly partaken by citizens, it gradually became more accepted (silently). Stag films were technically illegal, but shown in sketchy places that could get their hands on a projector. Pin up calendars and the like were huge in the 1940s.
It gets more disgusting from there as technology improved and I think you get the picture. Suffice to say, it really took off in the 70s with the proliferation of home media and relaxed governmental regulations. Adult theaters, nude magazines, home media, etc. became highly profitable enterprises that were legalized and got people hooked.