Word of Mouth is the highest compliment your customers can give you.
The best time to ask is immediately after you have completed a service for them or delivered to them. If not in person, make a follow up call, and find out if they received what they were expecting. Ask them to write about your company whether that means on Facebook, Twitter or a paragraph for you to add to your website.
It doesn't hurt to ask, you may just get the quote you are looking for.