Why is it that you see a green light if you get hit in the eye?

Seeing "stars" A blow to the eye will stimulate the retina which will think that the disturbance from the shock of the hit is a light flash. The retina has no nerves of pain, or pressure or most other sensations It just has light and thinks any stimulus is light. The color is variable and can be green, or light, or red depending upon the power and angle of the blow and the portion of the retina hit.
Green cone cells. The eye has 3,specialized cone cells in retina. It could be the green cone more sensitive to the trauma in your case. For more information about color cells please refer to this link http://www.ncbi.nlm.nih.gov/books/NBK11059/