21 is an ignition circuit trouble code and 51 is a fuel injector circuit code. Your best friend is a factory service manual. Diagnostic steps for trouble codes can be found in the "Engine Control" section. You might be able to find a downloadable version in Nico Club's site. You can get a 1994 Pathfinder Engine Control chapter download, which should be almost identical to the 1993 manual, in the "knowledge base" section at NissanHelp.com:
http://x.nissanhelp.com/forums/Knowledgebase/links/21/
Of course, the first thing to do is check your basics. Vacuum lines are easy to check; look for sources of leaks, such as splits or disconnected hoses. There isn't a whole lot of vacuum hoses on a VG engine, compared to some engines, so it's not a difficult task. Make sure the spark plugs are in good condition and are the proper type and preferably NGK brand. Make sure the ignition cables are in good shape, as well as the distributor cap and rotor. Avoid using replacement parts on the engine that are not NGK or genuine Nissan. Check for any splits or leaks in the air intake duct. Check for play in the distributor shaft or bearing noise when running; many 21 codes are caused by distributors that are bad or have worn shaft bearings. The fact that you do have stored codes is a good thing as it helps point the way to what may be the trouble. But, remember to erase these codes after repairs as they do not self-erase over time and trips, like on OBD II systems.