According to Colin Meloy, "Pop music has always adopted the style of marrying upbeat melodies to dour lyrics. But I think there's less irony [on The Crane Wife] than the previous records; it's more earnest. The music is there to really push up the sentiment of the songs and underscore the drama." (Source)
Even though "O Valencia" is on The Crane Wife, it does seem to follow the pop tradition of putting happy music to a sad story. Still, the music manages to "underscore the drama" in key places, including the very beginning.
The song starts with only lead guitar and drums. There are just two lonely instruments blending together, which perhaps isn't unlike how the speaker and Valencia are two lonely people who will soon find each other.
As the verse goes on, more musical layers are added each time a new obstacle to the relationship is mentioned. The first lines are, "You belong to the gang / And you say you can't break away," which outlines the first problem. The rhythm guitar and bass come at, "And our families can't agree," which is problem two.
After the second verse, we get to, "So await for the stone on your window." There's almost a hushed pause at the word "await." Even though all the instruments are heard, they sound like they're holding back until the next part of the line, "on your window, your window." This is probably the kind of thing Meloy was talking about when he said that the music is there to "push up the sentiment."
The next verses and pre-chorus are very similar to the beginning of the song. As we come to the chorus, where the title of the song is finally sung, the xylophone-sounding glockenspiel, a deep piano, and harmony vocals are all added to the mix. Along with the these additions, we learn of Valencia's death for the first time when Meloy sings, "With your blood still warm on the ground." This is pretty good evidence for the earlier idea that more instruments means more problems.
As we approach the climax of the song, where the brother "call[s] out" the speaker and Valencia is shot while trying to protect him, the music changes to a configuration we haven't heard. The lead guitar drops out, and we're only left with percussion and sparse piano notes before the "shot...hit[s] hard." Once again, The Decemberists are building up that tension. The change in the music tells us that something big is about to happen in the story, and, just as Valencia is shot, almost all the instruments we've heard so far return.