Within the custom of socks matching trousers, there are many opportunities for pattern. As long as the background is of that same colour, there is no reason why the sock cannot have a pattern of dots, stripes, even checks, and remain within this tradition. A long single line up the sock was popular in the forties as a means to exaggerate the height. Manhattan playboy Peter Arno was a particular fan (that’s him, above).
The guideline on pattern is the same as with any other – keep them balanced. Patterned socks will generally work best with plain trousers. Or, at the least, they should have a smaller, denser pattern.
A trifle more exciting is the English country tradition of bright socks, particularly red. This can be effective if subtle. I find it hard to resist pairing a plain navy suit and white shirt, for example, with bright red socks. Yellow also works well. (It has something of a modern echo in the bright lining of a suit, though this is less subtle and less flexible, as it only gives one colour option for a suit. Better to keep the suit plain and play around with socks/handkerchiefs/ties depending on your taste and adventurousness. There is also the risk that one might feel tempted to display the lining, which is certainly not very tasteful.)