Sources for religious obligation
According to mainstream Islamic scholars, covering all but the face and hands in opaque loose material when in public is obligatory for all Muslim women who have reached menarche. Covering is also considered obligatory during prayer. The verse quoted to explain the obligation of head covering for women is in Surah al-Nur, ayah 31: "And say to the believing women that they should lower their gaze and guard their modesty; that they should not display their beauty and ornaments except what (must ordinarily) appear thereof; that they should draw their veils over their bosoms and not display their beauty except to their husbands, their fathers, their husband's fathers, their sons, their husbands' sons, their brothers or their brothers' sons, or their sisters' sons, or their women, or the slaves whom their right hands possess, or male servants free of physical needs, or small children who have no sense of the shame of sex; and that they should not strike their feet in order to draw attention to their hidden ornaments. And O ye Believers! turn ye all together towards Allah, that ye may attain Bliss." [Quran 24:31 -Yusuf Ali]
This requirement is relaxed for older women, as Surah al-Nur, ayah 60, states: "Such elderly women as are past the prospect of marriage - there is no blame on them if they lay aside their (outer) garments, provided they make not a wanton display of their beauty: but it is best for them to be modest: and Allah is One Who sees and knows all things." But older women who are used to wearing hijab may continue wearing it past this point.
The Qur'an does not address head covering during prayer, but a hadith states: "The Prophet (peace_be_upon_him) said: Allah does not accept the prayer of a woman who has reached puberty unless she wears a veil." This is interpreted to include prayers in private as well as congregational prayer.
Some lay Muslims and Muslim scholars have come to the conclusion that covering the body and a general attitude of modesty is required of Muslim men and women, but that covering the head is not required. They point out that the Qur'an directs women to cover "except what (must ordinarily) appear thereof", and that in Arab society, this did not include the head, whereas in other cultural contexts, the head and neck ordinarily appear. This view is not widely accepted among Islamic scholars.