Arjuna, one of the five Pandava princes, adopted this disguise during the year they spent in hiding following a twelve-year exile in the jungle.
The Pandavas are the protagonists of the Mahabharata, the second of two major Hindu epics that chronicles the Pandavas' battle for dominance against their relatives the Kauravas.
Arjuna's elder brother, Yudhishthira, had lost all of the brothers' freedom and wealth to the Kauravas in a game of dice at one point during their battle.
As a result of their defeat, the Pandavas must go into exile for twelve years and then return to society unnoticed for the thirteenth year.
If the brothers are found during that year, they are expected to be exiled once again.
Arjuna, the epic's most valiant warrior, assumes the appearance of a eunuch called Brhannala, knowing that no one would suspect him.
He spends the year as a eunuch, singing and dancing in the palace's women's quarters.
Arjuna takes part in a major fight at the conclusion of the year, still dressed in his eunuch's attire, in which he destroys the Kauravas' army.
You may also want to read more about Hinduism here.
Be sure to check out my writings on religion here.