Yes, you can get chest pains when stressed out. When you are stressed out, you might experience panic attacks, which are intermittent and random episodes of chest pains, heart palpitations, tremors, voice quivering, knees shaking, tingling sensations in hands or feet, shortness of breath, and tunnel vision.
The following video explains more about stress, anxiety, and chest pain:
If you continue to get chest pains, it is recommended that you see your doctor to rule out any medical cause for your chest pain.