The 'when' doesn't have a definitive answer, as it was rather a case of APs becoming more prominent with time and standalones becoming less common. But even today standalone adventures are still produced - see the Pathfinder Modules line, or "Lost Mine of Phandelver", or the AL adventures.
That said, I would suggest two key milestones along the path: the first of these would be the publication of "The Shackled City" in 2003/04. This was the first of the paths in Dungeon magazine, and proved to be wildly successful - although it wasn't the first path, it was probably the game-changer. The second was the end of the print Dungeon in 2007, and the consequent start of the monthly "Pathfinder Adventure Path" line - which is, obviously, nothing but paths.
The 'why' is also quite complex, in that I don't think there's a single root cause, but I can think of at least four contributing factors:
- Overworked DMs have found utility in a "campaign in a box", and have found* that they are less work even that cobbling together standalone published adventures. (* This is not universal - some DMs find they have to do a lot of work adapting a path before they're happy with it.)
- There's a value in a common experience, and saying "we're playing "Rise of the Runelords"" works better for that than naming individual modules.
- Paizo have certainly noticed (and I'm sure WotC have as well) that a lot of people buy their adventures to read and not necessarily to play. If it's just for reading, though, an Adventure Path is probably a better bet than a standalone module - certainly, the heavy plot seems to lend itself better to a beginning/middle/end structure.
- Producing two Paths in the year effectively gives you two "seasons", which is really good for marketing purposes - it gives you a focus on which to hang your advertising campaign, and it also provides nice, easy, and regular "on ramps" for new players. Standalone adventures tend to be less good for that, because they tend not to be such a big event.
I should note that I may be wrong about any, or all, of the above.