Many people close their eyes while praying to make concentration during worship. Sheikh Assim Al-Hakeem answered the same question whether closing of eyes is allowed or not.
Sheikh said that to know whether it is permissible or not we have to refer to the Sunnah of Prophet Muhammad (PBUH). Because we pray as Prophet offered his prayers and there is no narration about closing of eyes.
He further explained that is why closing eyes should not be a regular routine but on some occasions and cases it is permissible to close your eyes.
Sheikh Assim explained that how sometimes it is permissible because you may see things and views that will distract you from worship.
Similar fatwa was also issued by Sheikh Muhammed Salih Al-Munajjid who simply shared the views of different classical scholars who mostly considered it Makrooh.
But Ibn al-Qayyim discussed the issue saying that if a man can fully focus while opening his eyes then he should do so but if he becomes more focused by closing eyes then it will become mustahab for him to close his eyes.