Music is integral to Synchronised Swimming. In the solo event it is all the swimmer has to synchronise with and swimmers in the duet and team routines must sychronise to each other and the music.
The choice of music is not judged but it will support the theme of the piece or may have even inspired the theme in the first place. The choreography and performance will be expected to mirror the tempo of the music in its speed.
In synchronised swimming competitions there will be speakers underneath the water so swimmers can continue to hear the music clearly.
Music actually carries better under the water than it does on land and so swimmers should be able to hear the music better when they are submerged.