My sons eye has been hurting and he has been getting migraines. What could be causing this?

Get him checked. The headaches may not be migraines, and eye pain may be related to an important intracranial process. That being said, eye pain can be related to migraine. To be safe, get him checked.
Headache. Some headaches can uncommonly originate from the eye. However, it is common for headache pain to be centered around the eyes, behind the eyes, etc. Cluster headache is similar in severity to migraine but tends to be centered around one eye and also might be associated with a droopy eyelid on that side. Get a medical checkup related to the headache first, and that doctor will refer if necessary.