Head-to-head contact is the primary way head lice move from one person to another (see How Can I Get Lice?).
While it is possible for head lice to get knocked off their host, they prefer to stay close to the scalp where the temperature and food supply keep them nice and happy throughout their lifetimes.
If a louse gets brushed off the head and onto some clothes, it has just 24-48 hours to find a new host, or it will die. And although lice have claws at the end of their legs, those claws are specially designed for grabbing a hair shaft, not the fibers of a shirt, making it a little trickier for the louse to get back onto a head of hair.
That said, as a way to prevent lice, it doesn’t hurt to launder clothes and other linens (in very hot water and drying them in a hot dryer) that were used by someone infested with head lice. But unless the source of the problem – the head – is treated first, washing clothes won’t do much to eradicate the lice.