I was in Würzburg in 2007. Spent two nights at Pension Spehnkuch (I believe still recommended by Rick). In the morning of the full day, I went to the Hbf and bought a WVV Grosswaben Tageskarte (now €4,45 pP, €8,90 Familie). Took Tram #2 from in front of the Hbf over to the base of the Marienberg hill and a bus to the Fortress. Toured the fortress, then the museum, and had lunch. After lunch, I took bus #9 over to the Residenz. Bus #9 goes between the Residenz and the Fortress every 45 min. I had a Bavaria Castle and Garden Pass, so I just went to the desk and signed up for a tour. At the start time of the tour, no one was there, so I just toured the Residenz myself. After the Residenz, I just walked back to Spehnkuch, which is near the Hbf.
Of the two, I much preferred Marienberg to the Residenz; I'm much more interested in history than over-the-top, gaudy homes.
If all you want to see is the residenz, it's a short walk from the station.
For the Marienberg, get the Tageskarte. It's 5 cent pP more than two single trip tickets (€2,20) but gives you more flexibility. Bus 18 leaves from the Busbahnhof to the right of the Hbf entrance as you come out and goes directly to the castle. Or, you can take tram #2 to Juliuspromanade, near the Residenz, and bus #9 from there. If you take the #2 tram all the way to Hartmannstr, on the other side of the river, it's about a 20 min walk to the castle.
Information for the transit system in Würzburg is at www.vvm-info.de (in German). I assume you have decided to use a Bayern-Ticket that day since the VGN TagesTicket is not valid to Würzburg.