First, you need a sprite for eye that will be able to visibly rotate (so e.g. if you set rotation to specific value, the eye will look at that direction).
Then it's simple vector math:
#eye variable should be set to your eye sprite node
eye.rotation = (get_viewport().get_mouse_position() - eye.position).angle()
If you move your camera, this may not always work properly, so instead it could look like this:
#camera variable should be set to your current camera
var mouse_position = get_viewport().get_mouse_position() + camera.global_position
eye.rotation = (mouse_position - eye.global_position).angle()