why is it necessary to open our eyes during namaz. What if we close them. I read in a lot of books but did not get a relevant answer
The scholars are agreed that it is makrooh to close the eyes for no reason when praying. The author of al-Rawd stated that it is makrooh because this is what the Jews do. (al-Rawd al-Murabba’, 1/95).
it is good to praying with open eyes if you didn't have any valid reason to offer prayer with closed eyes.
Closed eyes may induce sleepiness mostly during Tahajjud or Fajr Prayer. ... It is Makruh disliked to close the eyes in Salaah. Rasulullah (Peace be upon him) said “When you perform Salaah do not close your eyes”.
Actually the sunnah shows that our prophet () used to pray with open eyes.
Therefore scholars considered this as the best manner to pray.
Nevertheless the most essential thing in salah is "khushu' الخشوع" or what is often translated concentration in the prayer.
They who are during their prayer humbly submissive (23:2)
Therefore some scholars consider praying with closed eyes as makrooh (frowned upon) if it was done without necessity or valid reasons. And permissible if it was for the purpose of khushu'.