According to Weird Al's interview on TheForce.Net, he managed to gather most of the advance intelligence from the Internet:

The song was entirely based on Internet "rumors." I gathered all the leaked info I could about the movie from all the various Star Wars websites (TheForce.net was particularly helpful), and was able to piece together the basic plot of the movie. We had planned to release my "Running With Scissors" album the month after "Phantom Menace" came out. But because of the lead time involved in recording, mixing, pressing, and physically getting an album out in the stores, I had to write "The Saga Begins" about two months before the movie came out. The folks at Lucasfilm have always been very friendly towards me, but they politely declined my requests for an advance screening or a peek at the script. Thankfully, the storyline according to the Internet followed the filmed storyline pretty accurately. Just for safety's sake, we didn't do the final mix on "The Saga Begins" until after I had seen the movie (I paid to go to the $500-a-ticket charity screening, so I could see the film a couple days before the rest of the world). I remember I changed a couple lines after seeing the movie - very minor tweaks. Like "He's probably gonna marry her someday" was originally "I HEAR he's gonna marry her someday," because according to an Internet rumor, in one scene Anakin tells the Queen to her face that he's going to marry her (which, as it turns out, wasn't in the final cut - but everybody knows how the storyline is going to go anyway, right?)