Can Non-Muslims Pray?
Question

May a non-Muslim pray in the ranks with Muslims? Please provide evidence for yes or no.
Praise be to Allah.It is not permissible for a non-Muslim to pray either in the ranks or on his own. What he has to do is to enter Islam before he prays , then to purify himself [by doing ghusl], and then fulfil the conditions of prayer. 
He is included in the obligation of prayer, and he is to be punished if he does not become Muslim and pray, but it will not be accepted from him unless he enters Islam. 
Allah says (interpretation of the meaning): 
“And nothing prevents their contributions from being accepted from them except that they disbelieved in Allah and in His Messenger (Muhammad).” [At-Tawbah 9:54] 
“If you join others in worship with Allah, (then) surely, (all) your deeds will be in vain, and you will certainly be among the losers.” [Az-Zumar 39:65]
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said, when listing the conditions of prayer being valid: 
“There are other conditions which include: being Muslim, being of sound mind, and having reached the age of discretion… No act of worship is valid unless one is a Muslim, of sound mind and has reached the age of discretion, apart from Zakah, which is obligatory upon the insane and minors, according to the correct opinion. With regard to the validity of Hajj performed by a minor, there are texts which state that it is valid.” (Ash-Sharh Al-Mumti`, 2/95, Ibn Al-Jawzi edition) 
And he (may Allah have mercy on him) said: 
“The conditions of prayer are: being Muslim, being of sound mind, and having reached the age of discretion; that the time for prayer has begin; covering the `Awrah; having purified oneself from anything that invalidates Wudu’; avoiding Najasah (impurity); facing the Qiblah; and having the intention of praying.” (Ash-Sharh Al-Mumti`, 2/289, Ibn Al-Jawzi edition) 
The same applies to the other acts of worship; they can only be accepted from a Muslim, so Islam or being a Muslim is a condition of acts of worship being valid, and their being accepted depends on that. 
Ibn Rushd (may Allah have mercy on him) said: 
“The conditions fall into two categories: 
The conditions of it being valid , and the conditions of it being obligatory . With regard to the conditions of it being valid, there is no difference of scholarly opinion that they include being Muslim, because Hajj is not valid if done by one who is not a Muslim…” (Bidayat Al-Mujtahid, 1/133)
For more details, please see the following answers: 2192 and 43164 , 
And Allah knows best.