The eye socket was the body cavity in humanoids where the eye was located.
In 2372, after Neelix had been attacked by a hawk, The Doctor claimed he was lucky the bird hadn't snatched his eyeball out of its socket. (VOY: "Tattoo")
The same year, the Nausicaans hired by Brunt to beat up Quark shattered his left eye socket, broke two of his ribs and punctured his lower lung. (DS9: "Bar Association")