A common problem with this generation of 4-runner is a dirty mass air flow sensor. The check engine light will come on, but most of the time the error code will not be for the mass air flow sensor. Usually it will be an error code for an oxygen sensor or something else on the exhaust side. It is possible to get emissions related error codes, but I have not personally seen this happen. Many people see the code for the oxygen sensor and assume it is bad and do not look at the mass air flow sensor.
Usually when you have a dirty mass air flow sensor, the engine will tend to run lean. A common symptom of this is pinging. I would recommend getting the mass airflow sensor cleaned about every 60K miles.
I too have had the same problem with the check engine light and have been trying to find the root of the problem for quite some time. I've had a tune up, replaced the MAF and both O2 sensors with no relief in site. Just when I thought it was the cat converters (insert ominous music here) I found a mechanic worth his salt, and the conclusion ---- it was the remanufactured MAF sensor that I was trying to save some money by buying; it lasted all of 500 miles. Try this as a diagnostic: When your on the interstate traveling about 50mph just stomp the accelerator and see what happens - my 4runner would rev up in RPMs, but bog down because of the lack of air getting to the engine. It not 3/4 acceleration (that seems to work fine), but full peddle to the metal so-to-speak. The codes reads something like lean bank one (another mechanic thought the fuel injectors were bad and wanted a lot of money to fix)
I hope this helps.
My 2000 Toyota 4Runner has never actually caused me to tow it, but, I have had the check engine light problem for about a year now starting at about 90,000 miles. My car would die on occasion when idling. So, first we (my nice mechanics) check the code and replace the O2 sensors. Then the light goes on and we find a pinhole leak in a short vacuum hose. Then the light goes on and we decide its fuel. So Superfuel, seems to work for awhile. Now the car goes on sporadic dying spells while idling, especially in rush hour traffic. After having to restart the engine about 8 times on the approach to the Bay Bridge, I am not a happy camper. The engine light doesn't come on anymore; superfuel does not work. We replace fuel filter and spark plug wires. Doesn't work. CAR FAX says the MAF sensor has been a problem with this model - I think that's what we will be trying next.