my memory is fuzzy on this one...
I can't remember exactly from my old music history courses, but I think in written music first became widespread in western Europe during the 1400s.
The Church during the Renaissance funded works of art (statuary, paintings, etc) by people like Michelangelo. They also hired composers to write Gregorian Chant and early "contrapuntal" instrumental pieces. Contrapuntal pieces used different groups of musicians facing each other at opposite sides of a church--they'd alternate playing music back and forth (kinda like dueling banjos) to create a cool 3-d stereo reverb effect during masses. Interestingly, one of the reasons Gregorian chant sounds so weird and "dirgy" is because early musical scales had fewer (and different) notes than the ones used regularly today.
But I digress. In order to play this church music consistently all over europe, these composers used a prototype of the written music notation we use today. It's use really exploded once the printing press was invented in the 1400s and cheap, mass produced sheet music became available.
I have no idea about other cultures beside Europe, though. China might also have used it's own form of musical notation, as well as the Roman empire. If other cultures had musical notation systems, I don't think there's very many examples extant.