Williams obviously meant the theme of desire to be prominent in his play since he put the word in the title. Several ideas about desire are communicated through Blanche and Stanley's lives.
First, desire leaves a trail of destruction. Blanche's desires caused her to ruin her reputation in Laurel, MS, and to violate her position of trust as a teacher by having relations with a minor, one of her students. By the end of the play, Stanley's desires have plunged Blanche into insanity and have caused a rift between Stella and her sister which, although not obvious within the time period of the play, will certainly bring continued heartache to Stella in the future.
Second, Williams makes a gender distinction with regard to desire. Stanley is someone who follows his desires moment by moment; thus he gets into brawls, physically abuses Stella, and rapes Blanche. However, at the end of the play, he retains his position of power in his home and among his friends (although Mitch shows some disapproval of him at the end). On the other hand, Blanche, a woman who acts out her desires in similar fashion, finds herself unemployed, homeless, and friendless.
Blanche and Stanley have different motivations for letting desire dominate them. Blanche chooses desire because of her grief. She says, "Death—the opposite is desire." In an effort to escape from the sadness and guilt of the deaths she has experienced—of her relatives and her husband—she pursues sexual desire. Stanley doesn't have a complex psychological motivation. He seems to act on a more primal level. He is seeking those "colored lights" just as a way to bring him immediate pleasure and excitement.
Finally, desire leads to a dead end. The "streetcar named Desire" brings travelers to the Elysian Fields, but that place is a false hope. It's poor, cramped, noisy, and violent. Desire is not the way to improve one's lot, to advance to a higher state, or to return to a former place of grandeur like Belle Reve. It does not advance human evolution but puts people on the level of animals, as Williams points out by having Blanche reference Stanley's animalistic tendencies.
Williams skillfully uses Blanche and Stanley's lives to develop his themes about desire.