I saw this on Word Detective the other day:

There are, as I've implied, a whole slew of possible origins of "dressed to the nines," meaning to be dressed in an elegant or elaborate fashion. One theory is that it came from an Old English saying "dressed to the eyes," or to please the beholder, which, in the peculiar spelling of Old English, would have appeared "dressed to then eyne." Through a process called "metanalysis," in which letters from one word migrate over time to a neighboring word, "then eyne" might have become "the neyne" and then "the nines." A similar metanalytic process transformed "a napron" (related to "napkin") to our modern "an apron."

On the other hand, the number nine holds an exalted place in numerology, and might have been adopted in the distant past as a synonym for "superlative." "Dressed to the nines" would thus be equivalent to our modern "dressed to the max."

It's also possible that the phrase come from an old jeweler's phrase "nine nines fine," referring to gold of 99.9999999 percent purity, or that the phrase refers to the nine muses of classical mythology, or to the spiffy uniforms of the 99th Wiltshire Regiment in England, or, well, you get the idea. There is no one answer, so I guess you'll just have to pick the theory you like best. Personally, I like the one about 99 bottles of beer.
www.word-detective.com

I guess the answer is that there's no definitive answer.

Hev