There are a number of reasons why a car would idle find but sputter when you accelerate. It could need a new spark plugs. You may also have to replace the filters. It might also be an issue with the air flow.
It may be a EGR valve issue. This valve is normally closed at idle and opens at about 40mph.
Vacuum leak; there is a slight load on the engine when stopped at a light because you are in gear, there is none when in park.
Fast idle motor is not functioning properly.
Carburetor needs rebuilding, most likely.
You might try checking you idle air control valve.
Look for a hole in the PCV valve hose on the backside of the engine.
NO... You have other problems. Sounds like WATER is in the fuel.
...sounds like you've got a dirty fuel filter. Fuel is delivered fine at idle, but when higher demand is made ( you press down gas pedal, the blockage prevents delivery of fuel.
Had a Jeep in the shop here with that problem last week and it turned out to be low fuel pressure. Try running a fuel pressure test. The Jeep would idle ok but when you tried to accelerate the engine would stall.
bad oxygen sensor bad map sensor
There may be a problem with the oxygen sensor that would cause this issue. There may also be a problem with the idle arm censor as well.
Some of your jets may be clogged. Clean/rebuid carb and this should fix it.