Prayer is the most obligatory of the Five Pillars of Islam next to the Two Testifications of Faith, and it was ordained in the best and the most perfect way for an act of worship. Prayer includes many of the acts of worship, like the remembrance of Allah Almighty, the recitation of the Quran, standing humbly before Almighty Allah, bowing, prostration, supplication, and Takbeer (uttering the words ‘Allahu Akbar’).
Prayer is also the head of the physical acts of worship, of which none of the religions brought by any of Allah's messengers is void. Prayer, unlike all other acts of worship, was enjoined by Almighty Allah on His messenger, Muhammad the Seal of Messengers, on the night of Al-Mi’raj (the ascension of the Prophet ). This is an indication of its greatness, a confirmation of its being obligatory, and a sign of its high status in the Sight of Allah. There are many hadeeths indicating the virtues of prayer and showing its being obligatory on all Muslim individuals. The fact that prayer is an obligatory act of worship is primarily known in Islam. So, whoever denies this fact is considered to be an apostate.
Linguistically, prayer means invocation; Allah, the Exalted Commands the Prophet to 'pray' for the believers, saying (what means): "…And invoke [Allah's blessings] upon them..." [Quran 9: 103]
According to the Sharee'ah (Islamic Jurisprudence), prayer is defined as a special kind of sayings and deeds beginning with takbeer and ending with tasleem (saying ‘assalamu alaykum wa rahmatullah’). It is called 'prayer' because it includes invocation. During prayer, the worshipper is in a state of invocation through worshipping Almighty Allah, praising Him, or supplicating Him for something.
This is why it is called ‘prayer’. Prayer was decreed by Almighty Allah on the night of Al-Mi'raj before Hijrah, as five prayers to be performed every day and night at specified times by every legally accountable Muslim. Allah, the Exalted Says (what means): "...Indeed, prayer has been decreed upon the believers a decree of specified times." [Quran 4: 103]
Those prayer times are the times pointed out by Allah's messenger through his words or his deeds. Allah, the Exalted, Says (what means): "And they were not commanded except to worship Allaah, [being] sincere to Him in religion, inclining to truth, and to establish prayer and to give Zakah. And that is the correct religion.” [Quran 98: 5]
In addition, in many verses of Allah's Glorious Book (the Quran), Allah, the Exalted Says:“And establish prayer..." [Quran: 2: 43]
Almighty Allah also Says (what means): [O Muhammad], tell My servants who have believed to establish prayer…” [Quran 14: 31)
Moreover, Allah, the Exalted Says: "So Exalted is Allah when you reach the evening and when you reach the morning. And to Him is [due all] praise throughout the heavens and the earth. And (Exalted is He) at night and when you are at noon." [Quran 30: 17-18]
Therefore, it is obligatory for whoever reaches one of the specified times of prayer, being adult and sane, to perform it, excluding women in a state of menstruation or postnatal bleeding. Scholars unanimously agree that it is not obligatory for women in the aforesaid two cases to perform prayer, nor to perform it later after purification. On the other hand, whoever is in a state of unconsciousness, as in sleeping, fainting, and the like, has to perform the prayer at the moment when they wake up or recover to the normal state. Allah, the Exalted, Says (what means): "...And establish prayer for My remembrance." [Quran 20: 14]
In addition, the Prophet says: "Whoever misses a prayer out of oversleeping or forgetfulness, let him perform it once he remembers it."
A guardian of a child has to command him to perform prayer when the child reaches the age of seven, though it is still not obligatory for him. But the purpose is to make the child interested in prayer and used to it. Thus, the child and his guardian will be rewarded when the former performs prayer, for Allah, the Exalted, Says (what means): "Whoever comes [on the Day of Judgment] with a good deed will have ten times the like thereof [to his credit] ...” [Quran 6: 160]
Moreover, when a woman showed the Prophet a young boy who was with her, saying:"Does this one have to perform Hajj (Pilgrimage), O Messenger of Allah?" He replied, "Yes, and you will have a reward."
So, a guardian has to teach his child how to perform prayer and how to perform ablution for it. A guardian has also to beat his child if the latter is ten years old and neglects prayer, for the Prophet said: "Command your children to perform prayer when they become seven years old, and beat them for (not performing) it (i.e. prayer) when they become ten years old; and arrange their beds (so that boys and girls sleep) separately." [Ahmad, At-Tirmithi, Abu Dawood, and other compilers of hadeeths]
It is also impermissible to perform prayer later than its due time, for Allah, the Exalted Says (what means): "...Indeed prayer has been decreed upon the believers a decree of specified times." [Quran 4: 103]
The meaning is that prayer has specified times at which it has to be performed. A prayer is impermissible to be deferred except for those who would like to combine it with the following prayer, provided that the said prayer can be combined with another, and that the case is among those in which combining two prayers is permissible as well as the person being one who is allowed to combine prayers in this way. As for delaying performing a night prayer until the morning, a day prayer until the night, or the Fajr (Dawn) Prayer until sunrise, it is by no means permissible, whether the reason is a state of major ritual impurity, minor ritual impurity, or anything else. Rather, one has to perform them at their specified times, regardless of one's state.
A person might happen to be detained in hospital where he is confined to a bed that he cannot leave to pray, or cannot change the impure clothes he wears, or cannot find pure earth to perform tayammum (dry ablution) instead of ablution to pray. Some ignorant people in this case defer prayer on the pretext that they will perform it later when possible. In fact, this is a grave mistake and a means of missing prayer whose reason is unawareness and lack of juristic consultation. What they have to do is to perform prayer at its specified times regardless of their states. Their prayer will be sufficient, even if it is performed without tayammum or in impure clothes; Allah, the Exalted Says (what means): "So fear Allah as much as you are able..." [Quran 64: 16]
Even if they pray without facing the Qibla (the direction of Qa'bah), provided they are unable to face it, their prayer is still valid.
The prayer is the basic pillar of Islam, and the main difference between a Muslim and a disbeliever. So, whatever good deeds one might do are useless if one is negligent of prayer, we ask Almighty Allah for safety.