The mutual dream scene in act 1, scene 7 places Harper in what they call the "threshold of revelation." Harper knows that something is not right in her seemingly perfect life. She's resorted to taking handfuls of pills to cope with it. At first, we might think that Harper's goal is to discover whether she is hallucinating as a result of all the pills. As her discussion with Prior continues we can see that clearly, she is hallucinating, but she is also on a mission of self-discovery.
Encountering Prior, who is wearing women's makeup, might be meant to show her that there are ways of living far outside her clearly structured Mormon world. Prior tells her things that she already knows, but has not admitted to herself. He tells her that she is profoundly unhappy, though she quickly admits to this. He also tells her that her husband is gay. This she accepts only after initially refusing to believe it. It is implied in this scene that she knew it for some time but needed to "hear" it and be confronted with it, even if only as part of a valium induced hallucination, to accept it.
In this way, the dream/hallucination is one of the crucial first steps that breaks Harper out of the conformist little world she had been living in. Throughout the rest of the play, Harper begins to take more and more control over her life and move into her own as a character.