Things like this are, probably, a gradual process.
However . . . my very rough estimate is that most N.YC. denizens would date it to ca. 1994. Certainly, by 1996, the “not nice” things your friend was talking about (porn shows and open drug use in Times Sq.) were on their way out, or gone. By 1998, they were (with a very few exceptions, at least as to Times. Sq., in my limited experience) gone.
Conversely . . . from a number of conversations with a number of residents – I have met very few people who lived in the city pre 1994 who did not have a mugging story (by which, for the most part, I mean that they (or in a few cases, a close relative/friend) were mugged, with a weapon, usually)). In my (again, somewhat limited) experience, almost no one has a post 1994-'95 mugging story.
Another benchmark I suppose is vagrancy. The difference is palpable – pre-1994, the “squeegee men” and beggars were very aggressive in seeking alms, as it were. There are still quite a few knights of the road, but their, I don’t know, passivity, is notable. At least until recent visits, I have never had a beggar, post 1994, physically approach or accost me; they tend to sit in doorways. Without passing judgment, pre-1994, they were more “in the face” of passersby, which (rightly or wrongly) tends to spook people. Visit San Francisco’s Tenderloin, even today, and see the difference.
I’ve tried to avoid opining too much – these issues are fraught with political baggage. The era I’ve identified with Manhattan’s “niceness” is clearly largely coincident with the Giuliani era, though I’m neither trying to turn this into a GD/IMHO, nor to boost Rudy/bash Dinkins. Nor am I, here, opining on “root causes of homelessness,” etc., or on whether the “increased niceness” simply reflected extraneous boom-time economic circumstances. Certainly, you’ll find some who say that things are slipping back now, even under the Republican (or, some would say, “Republican,” Bloomberg); I’ve seen a bit more “broken windows” going unremdiated in recent experience.
This also doesn’t address the fact that much of Manhattan, and N.Y.C., still isn’t, and never really was, that nice – and for the guys who continued to get mugged, periodically, in the Village, the “niceness” was no consolation, even in the “nice parts.” As for the “not-nice” parts – Washington Heights? East New York? Parts of Alphabet City, anyone? But . . . at the height of the “renaissance” . . . it was rather amazing to see how much safer the formerly blighted sections (much of East and West Harlem; Inwood; LES; Hell’s Kitchen) had become.