Though your question seems rather broad, I assume you're asking primarily about the views expressed by writers and philosophers about music. We have to restrict ourselves to a relatively small selection of opinions, so I will choose three writers of the nineteenth century whose views have been considered distinct from those of others and who have been seen as of particular importance in the literary world and the world of ideas.
E. T. A. Hoffmann (1776–1824) was a German writer best known for his Gothic fiction in short stories such as "Mademoiselle Scudery," "The Sandman," and "Ritter Gluck." But Hoffmann's work as a music critic, and his inclusion of subject-matter focusing on music in his Romantic tales, are just as important as his Dark Romantic tendencies. In the short story "Don Juan," Hoffmann creates a philosophical interpretation of the plot of Mozart's opera ("Don Giovanni" in Italian) embodying the Romantic idea of man vs. the conventions of society. The most significant point, however, is that Hoffmann identifies Mozart's music as the element that expresses this view independently of the libretto or the bare storyline of the opera. Mozart, in Hoffmann's view, creates his own world of ideas which possess a "higher" reality than that of words, and Hoffman transforms the Don Juan story into a kind of proto-existential parable of man asserting himself in an otherwise meaningless cosmos.
Arthur Schopenhauer (1788–1860), in his book The World as Will and Idea, similarly sees music as the highest art form. Schopenhauer's view, so far as I understand it, is that while other arts such as literature and painting, which are directly "representational," are an expression of what he identifies as "the will," music is the will. A famous quote from Schopenhauer is that "music is the melody whose text is the world." In other words (and to oversimplify), music is a more direct expression of reality—or rather, it is reality in an unmediated way, unlike literature and painting, which are copies of reality. Both this view and Hoffmann's view are typical of Romanticism, especially German Romanticism, with its focus on the irrational and emotional basis of the world and of human emotion. It is not a coincidence that during this period, the early nineteenth century, purely instrumental music—symphonies, sonatas, and chamber and piano music, with Beethoven as the leading—began increasingly to be considered more important and more fully expressive than the vocal-instrumental forms such as opera and religious music.
The last writer we'll examine is Leo Tolstoy (1828–1910), whose ideas were quite different from, if not actually the opposite of, those of Hoffmann and Schopenhauer. Though Tolstoy was familiar with classical music in the way any upper-class European of his period was expected to be, he had little feel for it. In his novella The Kreutzer Sonata (named after a piece by Beethoven), he expresses the view that music is a dangerous art form because it stirs up the emotions in an uncontrolled manner and because it creates thoughts that are not fully comprehensible or identifiable. Various other writers and intellectuals through time have been resistant to the value of music for the same reason, in effect, that Hoffmann and Schopenhauer praised it—that it represents a form of expression not rational and not able to be analyzed and given definite meaning like that of literature.
The above are merely a sampling of views in answer to a very broad question, but they are a starting point for one wishing to understand the diversity of opinion about music and its function in the world of the arts and ideas.