Joey had this problem as a puppy, some groomers express the glands whether they need it or not, but this is no longer recommended. The vet can show you the proper way to do it.  If you do it wrong, you can push the contents further up the sac, and this could lead to impaction and infection, so doing it the right way is important.  You can usually tell if this is the problem because the area is a little poofy. Other causes could be a sanitary grooming where the  area was shaved, and this can lead to irritation.  You might also want to aid a little fiber to the diet, if this is a common problem.  I added about a teaspoon ground flax seed, and a few green beans, I don't know if they helped, but he doesn't have the problem any more.  
Anal Glands (Sacs): Impactions, Infections & Abscesses in Dogs