Or maybe I should have titled this "Music and the Supernatural"? The two seem to have been entangled for centuries, starting at least from the time of Homer and Dark Age Greece. In this case, I'm referring to the Sirens that Odysseus runs into in his journey home as told in the Odyssey. Though, that myth has to have been a part of the culture before Homer was writing.
Nowadays in fantasy writing, music is still intertwined with the supernatural. Tolkien did it - a lot of the magic in Middle-Earth is tied to music, both in The Lord of the Rings and the Silmarillion. Even the creation of Arda was done through music. But, magic and music are tied together: in The Silmarillion it says: "For Felagund strove with Sauron in songs of power..."(The Silmarillion. 171), for example, and that instance is not unique either. There are others in The Lord of the Rings too. For example, when Strider was attempting to heal Frodo after the Witch-King's attack at Weathertop, "He sat down on the ground, and taking the dagger-hilt laid it on his knees, and he sang over it a slow song in a strange tongue"(The Fellowship of the Ring. 265). There doesn't seem to be any other explanation for for that, besides some form of magic.
The Lark And The Wren, The Robin and the Kestrel and The Eagle and the Nightingale, as well as A Cast of Corbies and Four And Twenty Blackbirds. At the same time, she has also written the SERRAted Edge/Urban Fantasies series about Eric Banyon. Both of those series are actually quite similar, despite the fact that one of the two is set in the modern(ish) day and the other is a more typical fantasy. By "similar", I mean that neither of the main characters really had any idea about magic and discovers it by accident.
I think, as well, though it's been long enough that I don't remember the details at all, that Terry Brooks had written a world which was created through music in one of his books. As I said though, I really don't remember for sure. However, thinking on the subject of music and magic reminded me that there are other minor examples as well. Elizabeth Moon connects the two slightly in The Deed of Paksenarrion if my memory isn't playing further tricks on me (not helped by the fact that I only have the e-book version handy, which is rather hard to search for quotes). But, there are two separate groups that seem to use music in connection with magic there: the Elves, and the Kuakkgan. The latter group I remember doing so for certain (as with the healing of Paksemarrion's horse, Socks), but I believe the former do as well.
Done right, tying magic to music seems to give it a structure that works well and doesn't seem to be as random as some I can think of. It's certainly something that the practitioner needs to work at in order to do well, and also makes for an interesting way of indicating that magic is (or at least might be) being done, without necessarily being repetitive, given the great variety of music out there, both in this world and in any fantasy world - and if there isn't the right piece for the job, at least some of the characters can probably write it.
Are there more examples of music and magic being connected together that I've missed out on?