Sharp needle like pain in his left eye. It has a random timing and lasts for 1 hour or 1/2 hour for the last 4-5 days. Inflamed area under right eye?

Recurrent erosion . Symptoms could be of recurrent cornea erosion. Did you ever has a injury to the eye or an abrasion. See your ophthalmologist as close to the time of having pain. Perhaps see the doctor in consultatipn and if you have no clinical sighs, explain the symptoms and ask if you can come in as a walk in when the pain occurs.
Pain. Sounds like dry eyes, recurrent corneal erosion (spontaneous scratch), or sty. Try warm compresses to the closed eyes for 5 minutes 3 times a day, artificial tears one drop 4 times a day and refresh pm ointment at bedtime. If not getting better see eye md.