Researchers Nathan Bailey and Marlene Zuk provide a variety of answers in their paper Same-Sex Sexual Behavior and Evolution (pdf). It offers a wonderfully brief (7 pages of text) but highly informative academic perspective on the subject. They include a varied list of examples of how same-sex sexuality benefits various species, with some really fascinating examples.
Also included in this paper are useful suggestions for standardizing nomenclature for same-sex sexuality in animals. I don’t follow their structure, but then, I’m not aiming for the kind of linguistic precision scientific papers require.