Contrary to popular belief, your delicious menu items are not enough to keep your customers loyal. All it takes is a new brand with better items and a little advertising (word-of-mouth or otherwise) to lure a customer away.
A good loyalty program can help mitigate this kind of brand migration, but it has to do two things consistently to work to a brand's benefit.
First of all, a loyalty program must be easy to use. The best restaurant loyalty programs are those that are chain-wide - meaning you can earn and redeem loyalty points at any location. Each franchisee has agreed to be part of the program, understanding the importance of loyalty and how it is good for the brand and, therefore, good for the location(s) they operate.
Chain-operated programs tend to be top-notch as there is a lot riding on them. If the system is down brand-wide, you get a lot of very unhappy customers brand-wide. Their loyalty becomes weakened and it's possible that they may start considering other brands.