It's certainly not the only factor in someone's sexual intercourse preferences, but it can be a relevant factor. Troubled relationships often force individuals to seek affection in all sorts of places. If that affection leads them into the arms of a member of the same sex, a sexual attraction that didn't previously exist could possibly develop, especially for women. Since women tend to more closely associate sexual attraction with emotional connection. The claim that sexual orientation is solely determined at birth is false, pure and simple. There is absolutely zero scientific evidence that proves that sexual orientation is a result of biology, as cited in a 2015 article written by the American Psychiatric association: "...To date there are no replicated scientific studies supporting any specific biological etiology for homosexuality."
What does exist, is a correlation between people with certain biological frameworks, and people who choose to engage in homosexuality. HOWEVER, there also exists the same amount of positive correlation between people who have psychological or family issues, and people who choose to engage in homosexuality.
So yes, psychological conditions such as the craving for affection that people in troubled relationships often experience have been show to have the same positive correlation with homosexuality that genetics do. So those that claim that genetics cause homosexuality, must by the same logic, using the same empirical, concede that psychology also causes homosexuality.
People are born gay or straight or bi or any other proclivity. Gay doesn't happen to someone. Gays don't recruit. A failed relationship may push a person toward experimentation, but if he lives gay afterward it's only because the relationship failed because he was gay before - didn't really care about the woman in all three love categories of Lust, Romance and Attachment.