Could be a lot of things. But let's start with the easy ( and cheapest) fixes first. You might get lucky.
1. Clean your throttle body and IAC with throttle body cleaner. This is a very common area of problems, especially when the engine is going to and from and idle state. The IAC takes over when you let off the skinny pedal....and if it doesnt react quickly enough....well....you get the picture. The engine wants to die. So, clean the heck out of that throttle body, spraying all the little slits and holes with the cleaner. Removing the IAC is necessary so you can spray it ( dont try to adjust it !) and you also need to spray inside where it goes.
Of course, the BEST way is to remove the entire throttle body and clean it....but you can sometimes get by with not doing so for a while.
2. Buy a can of Seafoam and pour half of it in your fuel tank. It might smoke a little and smell funny for a little while, but Seafoam cleans a lot of stuff out of your tank, injectors, combustion chambers, etc. It works wonders sometimes...and will help with a water problem ( condensation) in your tank.
3. Did you get a recall notice for a fuel tank sending unit? If so....get it done.
4. Check fuel pressure at the rail with a gauge.
5. If you have done #1 and 2 above....then go to Zeejay's list below, of 12 things to do if it's stalling.....the dirty dozen...so to speak: