If you can tap it and the lights come back on it sounds like the lights are ok but you have a weak connection somewhere. I don't know how much different a '98 is from my '94, but you could possibly pull the instrument cluster out and wiggle stuff around until you found the loose connection. (You should be able to just turn on your running lights to make the instrument lights come on.) I didn't have this problem with my lights but with my stereo instead (the connections are relatively close under the panel). I could tap the dash above my stereo head unit and my passenger speaker would work again. After a little Dust-off canned air and some dielectric grease it has been working fine.
OK, I have my old trusty Haynes manual (If you do not have one, GET ONE, or two, or three. I have the Haynes 1993-1999 Ranger pick-ups, Haynes 1993-2005 Ranger pick-ups, Chiltons 1983-1994 Bronco II/Explorer/Ranger)
It looks like you have to remove the steering column cover on your model, I think that is two or four screws, then remove the screws holding the bezel (the plastic piece around your gauges-not the clear plastic, though.) On my truck this was one whole piece all the way around the stereo unit and I had to pull the ash tray out. Now you can remove the clear plastic and then the instrument cluster to get to the rear of it where the bulbs are. I don't remember, but you may be able to remove the whole cluster without taking the clear plastic off, but it doesn't matter either way. You just need to get behind the cluster to the lights.
By the way, you may want to disconnect the battery to disable your airbag if you have one. Once you get done beating around that area and get the cluster pulled you need to hook it back up to run the lights, but those airbags cost a pretty penny to replace and it would probably knock the $#!+ out of you when it deployed, so be careful and use your own discretion.
It may turn out to be a few bulbs, but I don't see why you would have several blow at one time without some other problem making them blow. I put my money on a loose connection or a skinned wire shorting out.
If you do have to go farther than this to find the problem I can't really help from here.