Chances are, your dog ate something he or she shouldn't have that was yellow. Also, bile is usually yellow, so he or she could be puking an empty stomach.
Every now and then my dog pukes up yellow puke, even though he hasn't eat anything that day. The vet said that it's most likely stomach bile, and that he needs to eat more, and be taken out more often.
Chances are that he is vomiting bile. This usually happens when the dog's stomach is empty. Try feeding him a small snack. Otherwise, take him to the vet.