I thought this was a really interesting topic.
I think this varies with the specific ballet, how it was choreographed, etc.
George Balanchine and Igor Stravinsky had a close-knit relationship with a lot of their works, and I know many of Balanchine's ballet's were made with the help of Stravinsky's compositions. Very collaborative.
I feel like a lot of plotless ballets are set to specific music to portray a theme, (i.e. death, marriage, love, etc.)
There are a lot of choreographers today that first hear a piece of music, and visualize their choreography. It would be difficult, for example, to have a ballet completely choreographed, and then try to add music to it later on.
One great of example of a collaboration on this very topic will be Miami City Ballet's new Twyla Tharp ballet next season, which will be set to music by Elvis Costello. :-)