The executive producer of the soundtrack, Robert Stigwood (who was also the Bee Gees' manager), called them up and asked them to write a few songs for a soundtrack to a film he was planning.
RSO Records wanted the song to share the then-title of the film, "Saturday Night", but the Bee Gees refused a title change, insisting that there had been too many songs with "Saturday" in the title, and the album already had a song with the word "night" in the title-"Night Fever".