What the song didn't tell you, the movie will.
Billy Joe confesses his love to the lovely Bobbi Lee only to cover his growing fear that he may, in fact, be homosexual. One night, at a barn dance, he gets a little drunk and rather than going with the hired whores, gives into his desires and sexual relations with an unnamed man. The guilt causes him to run away, hide in the woods and eventually confess everything to Bobbi Lee who doesn't want to believe him only because she was enjoying the forbidden nature of their love. In the end, he cannot accept his sexuality nor can he hide behind Bobbi Lee and that's why he throws himself off the Tallahachee bridge.