Some people get the bruised eye socket because of the headache. And others may get the painful eyes socket because of the unhealthy symptom in body. There are many reasons that could cause the eyes socket pain because of the pain in nerves. You could treat it with medical care which will let your eyes get recovery soon.
Because bruised eyes are usually resulted from a shock on your eyes. But as you can see, there might be some other causes of your problem, such as infections of your eyes, or some problems with your nose or head. So, I can see that your problem is complicated, thus I suggest that you try to consult a doctor and find out the reason.