I have never met Rich Hickey, but I have three things in common with him: we both like to program, we play guitar, and we have Music Composition Bachelors degrees from Berklee College of Music. Here's what Mr. Hickey has to say on the subject:
Software design and composition have a lot of similarities. Both
involve manipulating and coordinating abstractions, and envisioning
their realization, in the case of programs that are processes, in and
over time. I’ve certainly found software design satisfies the creative
urge I intended to pursue in composition, and has completely displaced
it.
Source: http://codequarterly.com/2011/rich-hickey/
A retired MIT graduate and programmer friend of mine remembers the days when there weren't enough math majors to draft into programming and companies actively recruited music majors (probably composition, but I can't remember) as a second choice.
Berklee is accredited and the music courses count for the math credits toward that accreditation.
Learning a musical instrument and learning to read music is a great way to keep your mind agile in general. Most programmers don't need to know base-2 fractions, but IEEE floating point is base 2 fractions. Most written music uses base 2 fractions to notate rhythm: a half-note, quarter-note, sixteenth-note, etc., though triplets are common too. So that one little small cross-over point is there. I suppose that finger dexterity can help you type, but typing helps that more, so I don't think that counts. Basically, I agree with @JimmyHoffa that instrumental ability is just not particularly related to programming.
On the other hand, I feel that my study of music composition has improved my ability to construct programs. Both involve creative manipulation of abstract concepts with regard to certain mathematical rules. Whether I'm writing music or designing a system, days/weeks/months of mental energy is spent conceptualizing things that don't exist, that I can neither touch, nor adequately draw a picture of, or build a physical model of. Each design needs to be tested inside my head and compared to other design alternatives. When difficulties arise, I need to creatively imagine new solutions or modify parts of the existing solution until things work out. This has proved to be a valuable skill for me in my career.
Also, a sensitivity to how your work will be received is a factor. Even if you are just writing code to be read, or creating an API for other programmers to use, a sense of craft and style can go a long way toward making it usable. Do you just name your methods willy-nilly, or do you try to find the most sensible and appropriate names? Obviously this is especially important in UI design. So that's another partial cross-over.
Composing music, especially serial or 12-tone music uses modulo arithmetic (modulo 12 for 12-tone equal temperament) which sometimes comes up in programming. But now I'm grasping at straws again.
Music improvisation is interesting because it combines instrumental ability with spontaneous composition. Many improvisers have a few "licks" that they vary the way a painter might mix a little yellow with his favorite red. The ability to truly compose on-the-spot is a rare gift and even for those who have it. But it's the composition aspect, not the instrumental aspect that's really related to program design.
The collaboration aspect of performing music (whether as an instrumentalist, conductor, or composer) translates directly to software or corporate projects. Amateur music relies heavily on volunteer support and most performers are passionate about what they are doing. If you don't keep people motivated, they just quit. Often they tell you frankly and directly what they are feeling in a way that never happens when their performance review or pension is at stake. Experiencing the NSFW version of these conflicts often provides insights into the cloak-and-dagger version that happens in boardrooms and design meetings. Good money gives activities a priority that participant's families can support, but at the end of the day, most people are motivated primarily by doing something they can be proud of. Harnessing creative energy for productive purposes is pretty much front and center in a band or with a development team.
So I would have to conclude that learning an instrument (or several) hasn't helped me much at all with programming. Learning to compose classical orchestral compositions and fugues has helped me a great deal. Certainly a CS degree from almost any university is a better way to learn to design computer programs, a math degree is probably a good second choice, but a music composition degree is more related than it might at first seem.
Ultimately, the best way to learn something is to do it - all the time! Check out How to Really Master a Programming Language
Still diversity is valuable. I suppose my composition degree gives me an edge in certain program-design circumstances, but people with a CS degree definitely have an edge in others, just as math or physics majors might have an edge in other circumstances. At this point, I'd say that all the experience I've had and all the CS studying that I've done outside of school have done my programming more good than my Composition degree, but it does still help with abstract design.
P.S. I don't write music any more. I pluck out a few songs for fun sometimes, but that's about it. Like Mr. Hickey, programming satisfies my creative urges in a way that music never did.