Describing someone as being "dressed to the nines" implies the donning of expensive clothing, jewelry and other fashionable accessories, most likely for a formal dance or theatrical performance. The origins of the term are unclear, but there are a number of theories related to the number nine specifically.
One prevailing theory concerning the origin of the term surrounds the significance of the number nine. Some sources believe that the number nine possessed a spiritual or cultural strength, much like the numbers three, seven, or 13 do today. For example, there were nine Muses said to inspire mankind's pursuit of the arts. If someone were described as "dressed to the nines", it could have been an outfit capable of impressing the nine Muses. The expression "to the nines" was actually in popular use before this specific term came into vogue. It's entirely possible that the reference was meant as a tribute to the Muses or other significant figures.
Another theory states that women of the Middle Ages would often wear fashionable gloves as part of their formal wear. These gloves were said to contain nine buttons from wrist to elbow, so if a woman was said to be "dressed to the nines", she would be wearing her most formal evening wear. In a similar vein, the price for admission for theatrical performances often ranged from one shilling for a front row seat to nine shillings for the preferred balcony or box seating. Anyone who could afford the highest ticket prices might be considered for the most expensive seats as opposed to the unwashed groundlings seated on the grass in front of the stage.
Some sources believe that the expression is somehow related to the expression "the whole nine yards." Each was once thought to originate in the tailoring profession, where it was believed that a quality suit or gown required 9 yards (8.2 meters) of material. In reality, most tailors and dressmakers could create very elegant clothing from far less material. The "whole nine yards" may have been inspired by the 27 feet (or 9 yards) of cloth used in a military gun belt, but no one has been able to connect "dressed to the nines" with the expression "whole nine yards."
There is even a theory that suggest "dressed to the nines" may have been corrupted from "dressed to the eyes", an expression that also means the donning of elegant formal-wear. It is possible that the original expression morphed from the eyes into the nines in the same way a narancia, the original name of the citrus fruit, became slurred as an arancia. We now say "an orange" even though the original word began with an "n," so it is possible that we say "nines" instead of the original "eyes." Anything is possible whenever dictionaries throw down the etymological gauntlet known as "origin unknown."