A retainer is when you pay a lawyer a sum of money in anticipation of using legal services. For example, a person might pay an attorney $1000, and then as legal services are rendered, payment is made from the retainer. Retainers are used when you know you are going to incur legal fees. You are just paying up front, instead of getting billed after the fact. Unused retainer fees are refunded to the client.
I don't see the need for anyone to retain a criminal defense lawyer unless he is charged or about to be charged with a crime, or is under investigation or indictment, etc. For the average guy who is not charged or about to be charged with a criminal offense, there really is no need for a retainer and I'm not sure that a criminal defense lawyer would accept a retainer when no legal services are anticipated. It would be like paying an orthopedic doc a retainer, just in case you need to have a broken arm fixed someday. Instead, you just find and pay the orthopedic doc if you ever need him.
If by retainer you mean having a criminal defense lawyer lined up "just in case", having his business card in your wallet or knowing who you will call if you take a ride to the cop shop, there is nothing wrong with that. But anyone who is arrested will have ample opportunity to find and retain counsel.
There are pre-paid legal services scenarios, where you pay a monthly fee and then receive XYZ legal services if you need them. I'm not really a fan of that.
More important, I think, is to pre-plan what you will say and what you will do in the event of a police investigation or arrest. Unlike finding a lawyer, which can be done subsequent to arrest, how you respond during the course of an investigation or arrest requires forethought. Knowing what to say and what not to say, and how to behave. Just my view.