Actually, a nun's 'habit' (a form of clothing) pre-dates any Islamic regulation. And typically, a nun's habit does not resemble a scarf at all. A Hijab is the head scarf covering of the head that Muslim women wear and dressing modestly.
People associate the Nun's habit with charity, faith and trust. Christian ladies wear a black veil when they morn, and Jews wear a Kippah, or Yarmulke. But both the habit and the hijab originate in the Middle East where they were a cultural necessity of the region.
It is said, about women who pray or prophecy, in 1 Corinthians 11:5-6: "And every woman who prays or prophesies with her head uncovered dishonors her head—it is just as though her head were shaved. If a woman does not cover her head, she should have her hair cut off; and if it is a disgrace for a woman to have her hair cut or shaved off, she should cover her head."
I hope this information helps you.