All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Collecting hair in a circular coil around itself, known as a bun, is not included in the Hadeeth in which the Prophet, sallallaahu ‘alayhi wa sallam, described some evil qualities of the women of Hell. In this Hadeeth, the Prophet, sallallaahu ‘alayhi wa sallam, said:
There are two types of the people of Hell that I have not seen yet: men with whips like the tails of cattle, with which they strike the people, and women who are clothed yet naked, walking with an enticing gait, with something on their heads that looks like the humps of camels, leaning to one side. They will never enter Paradise or even smell its fragrance, although its fragrance can be detected from such and such a distance. [Muslim]
Commenting on the Hadeeth, Al-Humaydi said:
They enlarge their heads with bands, turbans and hair extensions until they look like humps of camels in their prominence. It was also said that the meaning is that such woman lack bashfulness as they look at men and neither lower their gazes nor keep their heads down. [Tafseer Ghareeb Ma Fi As-Saheehayn]
A similar interpretation was given by Ibn Al-Jawzi in his book Kashf Al-Mushkil min Hadeeth As-Saheehayn]
An-Nawawi said, "The meaning of 'with something on their heads that looks like the humps of camels ' is that they make their heads look bigger by using veils and turbans which they wrap around the head." [Sharh Saheeh Muslim]
Al-Qurtubi said:
He, sallallaahu ‘alayhi wa sallam, likened their heads to a kind of camels who have very high humps, as they collect their hair plaits at the top of heads, as a means of adornment and beautification. Or perhaps they do that by employing some materials that they use to increase the size of hair. [Fat-h Al-Bari by Ibn Hajar]
Ibn Al-‘Arabi said, "It is metaphor for magnifying the heads by wrapping pieces of cloth around it so that a person who looks at them falsely think that it is hair. This is prohibited." [Faydh Al-Qadeer by Al-Munaawi]
Thus, it is permissible for a woman to wear her hair in a bun, whether at home or when she goes out, after covering it with a Hijab, for it is not included in the referred to Hadeeth.
Allah knows best.