'Weird Al' Yankovic actually first became a popular artist in the late 1970s, not in the 1990s; he released his first single - a parody of 'My Sharona' called 'My Bologna' - for Christmas 1979. Perhaps the biggest influence on Weird Al's early success was a nationally broadcast novelty song-focused show hosted by one 'Dr. Demento', which broadcast everything from 'They're Coming To Take Me Away, Ha Ha!' by Napoleon XIV to 'Fish Heads' by Barnes and Barnes. Weird Al Yankovic's 'My Bologna' quickly became a favourite on the Dr. Demento show, and provided a strong first platform for Yankovic's career, in terms of getting a leg up into show business. In the novelty song world Yankovic was, from this point onwards, a big deal, whose music often was featured prominently on shows like Dr. Demento's, but this didn't necessarily translate into quick mainstream success.
What is generally changed 'Weird Al' Yankovic's career, in terms of making him a well-known celebrity, was MTV. In 1983, for his parody of 'Mickey' by Toni Basil ('Ricky') from his first album, Yankovic made a music video intended for airplay on the still-quite new MTV, which he described to the authors of the oral history I Want My MTV: The Uncensored Story of the Music Video Revolution:
On “Ricky,” my parody of “Mickey,” the budget was $3,000. We shot on video at somebody’s house in the San Fernando Valley, very much like a porno. My friends were extras in the video. There was one scene where I’m supposed to be shaking maracas and nobody had bothered to get maracas. But we had a bowling pin. I thought, “Maybe if I shake it fast enough, it’ll look like a maraca.” Apparently, it was good enough for MTV.
This was enough to propel Yankovic's song beyond the novelty song game, and towards the top 50 ('Ricky' got to about 63 in the charts). The song that made Yankovic a star was his parody of Michael Jackson's 'Beat It', 'Eat It', from Yankovic's 1984 album In 3-D. Unlike 'Ricky', this was a genuine mainstream hit, and MTV was the main reason for this, because Yankovic not only parodied the song but quite expertly parodied the video for 'Beat It'. In I Want My MTV, Yankovic says:
People became intimately familiar with every nuance of a video, which made it easy to do a parody. I could tweak something a bit and people would get the joke. Michael Jackson was the biggest artist in the world, and I thought it would be great to parody “Beat It.” As it turned out, Michael had a great sense of humor and he personally signed off on “Eat It,” which blew my mind...as soon as “Eat It” went into heavy rotation, my life changed. It was overnight fame.
I Want My MTV also quotes Harvey Leeds (the director of video at Epic Records) as saying about Yankovic:
MTV loved Al. Because every time he parodied a video, it only served to reinforce the power of MTV.
Therein lies the rub, of course. MTV was a TV station prone to mythmaking, which liked to exaggerate its (still considerable) power in the music industry, and which liked to portray itself as the coolest thing on the planet. 'Weird Al', in making pretty expertly put-together parodies of songs that MTV's audiences would have known intimately - along with (often frame by frame) parodies of the videos that went along with those songs on MTV - was making content that was perfect for MTV. This showed how cool MTV was - here was an in-house parodist of what they were doing - and it showed how powerful they were in that they could even make 'Weird Al' a star.
But 'Weird Al' also made the most of his opportunity for celebrity. From 'Eat It' onwards, the parodies were very often literally pitch-perfect, with a lot of effort put into making sure that the songs sounded almost exactly like the original (while still being very clearly Weird Al), and what's clearly very carefully worked out parody lyrics that often very cleverly contrast the song with instantly recognisable pop culture touchstones (or food). It's probably also fair to say that, despite his 'Weird' image, that Yankovic has a certain star quality/charisma suitable for music video - he knows how to project to a video camera, and has an instantly recognisable sound and image.
And of course, the longevity of his career is also because he was never 'cool' in the way that pop stars are meant to be. As a result, when the things he parodied became passe, he could move on to parodying whatever the new thing was and would still be exactly as cool as he previously had been (i.e., some nerdy guy with weird hair who played the accordion). This all meant that he became the parody guy, and stayed the parody guy, because his skills as a parodist, if anything, improved over his career.