A line from a 70s punk song, and considered by most to be good advice. The problem, most people do not know their rights as well as they think they do. I cannot tell you how many times people have told me that they thought police had to read them rights when they are arrested. The Miranda advisory, known to all T.V. cop show watchers, only has to be read when a suspect is being held in custody, AND police want to ask the suspect questions to get a statement that they can use against the suspect in court. If the police will not be questioning the suspect they do not have to read the rights. If a suspect is not being held in custody police can ask them questions without reading rights. This means that police can question you and use what you say against you without reading rights as long as you are free to go, even if you are in a police station, or in a police car unrestrained. Even if you are restrained, if you start talking on your own without them questioning you they can use what you say against you.
Bottom line, you have rights, but knowing them is not as simple as most people think. If you are in a situation where you are, or may be questioned by police you need to get good advice before you start talking. If not, you may find out the hard way that you did not know your rights as well as you thought, and you may be singing the lyrics of another classic song, ‘I fought the law and the law won’.