Yes coconut oil can be applied under your eyes as long as you're careful to not get any coconut oil in your eyes you'll be fine.
To get rid of blemishes apply the coconut oil to the blemishes around your eye and leave the coconut oil on the blemishes for 15 to 20 minutes.
Then wash the coconut oil off with warm water and let the skin air dry.
The antibacterial properties of coconut oil will also work to get rid of acne.