The short answer is there is no easy way to tell the difference, unfortunately "stomach pain" is a complaint that could refer to a number of different locations depending on the person. That said, I'll try to generalize a bit to pick up on some broad differences:
1) Generally the pain is not well localized or periumbilical, the issue with this is a lot of abdominal pain can do weird things based on the innervation of that region, generally speaking issue with the digestive (with the exception of the ascending and descending colon) will localize to the mid-line of the abdomen, other organs such as the gall bladder, ovary, ureter, kidney, and the ascending and descending colon. The other issue with abdominal pain from specific physiologic causes is it can be referred elsewhere, for example if your gall bladder is inflamed you might have pain in your scapula, or liver problems might cause pain in your right shoulder due to the innervation of the region.
2) There is general no association between the pain and what you have eaten, other activity, or stool pattern (either the character or the presence of blood, if these change, or you notice dark, tarry stools contact a physician.), however you might also feel tired or have nausea, dizziness, or a headache.
3) Often stress related abdominal pain will run in families, so other family members might have had gastrointestinal problems similar to your.
4) Most of the time growth and development will be normal, and there will be no associated systemic symptoms, such as weight loss, fever, rash, joint pain or swelling. If you have any of these problems you should consult a physician as they indicate a number of other pathologies, many of which are serious risks to your health.
5) The pain usually resolves within an hour, and is accompanied by stress. Also, if you are in a reduced stress environment the pain should be reduced or eliminated, and the opposite should also be true, if you are under acute stress you should be more likely to have pain. Most episodes of pain should also be accompanied by periods of increased stress. Also, all other pathological processes should be ruled out.
And the general disclaimer:
This is not intended nor recommended as a substitute for medical advice, diagnosis, or treatment. Always seek the advice of your own physician or other qualified health care professional regarding any medical questions or conditions.