It is reported from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the verse 'And do not recite your prayer too loudly, nor too quietly' [Surah al-Isra: 110] came down when the Messenger of Allah (peace and blessings be upon him) was in hiding in Makkah. When he (peace and blessings be upon him) raised his voice in prayer, the idolaters would hear it and would revile the Qur'an, the One who revealed it and the one who brought it. So Allah Almighty said: 'And do not recite your prayer too loudly' [Surah al-Isra: 110], "Do not raise your voice in your prayer so much that the idolaters hear," 'nor too quietly' [Surah al-Isra: 110], "and do not recite it so softly that even your companions cannot hear," 'but seek a way between that' [Surah al-Isra: 110], "rather, adopt a moderate way: let them hear you, but do not raise your voice too loud, so that they may take the Qur'an from you."
(b) It is also possible that all of these matters are meant by this verse.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3011