A dog nibbling on clothes is a sign of affection. Dogs communicate and explore with their mouths, so this is a sign of them wanting to be close to a person. This action is typical for puppies or new dogs that are getting acclimated to their owners.
According to The Daily Puppy, dogs learn to use their mouths while playing with their littermates. In the litter, a dog uses his mouth to learn about his environment. Once the dog is out of the litter, he directs his attention to his owner. According to the source, owners should monitor and correct the behavior so that it does not continue into adulthood.