Just went through this a couple times with my bike. My advise would be logical and step through it.
- Bike starts so you know it's getting fuel
- Bike idles so you know the idle/pilot jet isn't clogged
- Check the float bowl?
- Can you rev the motor or does it stall?
- Does the gas cap have a vent? Is it clogged?
- Check the fuel filter if there is one?
- Right as it stalls pull the fuel line, is it dry?
- What exactly are you doing when it stalls? Or does it just die?
There are a lot of variables and you just need to cross them off until you find the right one. Also don't forget the wild cards like electrical and switches.