Minecraft wiki entry for Combat, associated text: Endermen teleport to avoid being hit by arrows and splash potions and teleport to a new location upon being hit with a melee weapon. They will also teleport away from water, lava, rain, and sunlight, despite the fact that sunlight does not harm them. They will also teleport if on fire, so the Fire Aspect enchantment is going to be more of an annoyance against them.