Why does my 98 GMC Yukon shutter or hasitate when accelerating but appears normal at idle?

There are many factors that can be causing this. It sounds like you are losing fuel pressure and there are many things that contribute to it. To begin with a basic, check your air filter. If it is clogged, the engine can get enough air to breathe when idling but when accelerating it starves for air. Check that first. Your fuel pump may be going out. It develops enough pressure to keep the engine at idle but when the demand for fuel is needed, it doesn't supply enough pressure to keep up with demand. Your fuel filter may be clogged restricting the flow of fuel from the tank to the engine, I would check this second after the air filter. Your injectors may be clogged, supplying just enough fuel to idle but not enough at demand. Run 2 or 3 bottles of Techron available at Walmart or Autozone. Add it to your gas tank. The Techron cleans a lot of the sulpher off the fuel pump and even the fuel gauge sending unit. It can't hurt If you can find someone with a fuel pressure gauge that can be attached to the fuel rail, have them check your fuel pressure. Your MAF (Mas Air Flpw Sensor) may need cleaning Your TPS ( throttle position sensor)may be going out. If the engines stumbles or shudders many times it will set a check engine light and by having the code read from your car's diagnostic port, you can get an idea of at least where to begin to look for your problem. To isolate it to one thing without some testing is like shooting in the dark.