I am asked this questions repeatedly. I first try to filter out who is a targe and who is potentially a witness to an investigation. If the person is a target my advise is almost always - say nothing. Tell the police you have an attorney (or want an attorney) and you can't speak with them before the attorney is present. Under Miranda (5th amendment) you have an absolute right not to tell the police anything. You also have a right to an attorney, even if you can't afford one. The police will need to provide you an attorney if one is requested before proceeding to discuss the case with you. Now keep in mind that Miranda only applies to persons who are being interrogated while "in custody." This means that if a discussion takes place and you don't request an attorney the statement evidence gathered from you can be used against you. Each and every week I have clients tell me that they weren't read their Miranda rights and they believe that somehow can be used to defeat the entire case. That presumption is absolutely false. Take for instance a DUI case. If the police don't Mirandize a subject in the field it rarely could have any impact on the case. The reason is that the client, at that point in time, was not in custody.
If a person is simply a witness it is wise to consult with an attorney to avoid a witness scenario developing into a criminal target. Most of the time that doesn't occur, but I have seen it happen more than a few times. Most attorneys will advise their clients to not make any statement. The only way to get around that is if you are 100% convinced there was no criminal culpability on your part or if the state offers you immunity.
Don't forget you have an absolute right to not speak with the police. Simply tell them you want an attorney and will not speak to them without the attorney present. If you are pressured to speak with them after advising them of your request you should not speak with them. I have reviewed thousands of interview videos and in some of them my client has requested an attorney be present. Despite their requests the police try to continue the interview. That type of statement evidence would most likely be excluded if charges are filed against that person. However, it has resulted in persons being incarcerated pre-motion to suppress. Sometimes for months.
If you have any concerns about a police officer's request for a statement call a qualified attorney immediately.