Yes they do and you have the right to say no and walk away. Unless they have reasonable suspicion you have committed a crime they have no legal basis to stop you.Ask a similar question
I disagree with the first answer to your question.
In addition to being able to stop you without a warrant under certain circumstances where criminal activity is alleged, under Washington law the police can stop you if they believe you are committing a civil infraction, such as walking down the street with an open container of alcohol or jaywalking. In these cases, the police can detain you long enough to identify you, check for outstanding warrants, and issue you a notice of infraction (ticket). If you are driving, the police can also stop you long enough to do the above mentioned activities as well as checking your license, registration, and insurance.
The police can't just stop you randomly though except under very narrow exceptions.Ask a similar question
Between the two answers given lies the best path which is prudence in talking with police officers. I had a client who followed my advice, refused to show ID and walked on. When he got out of the hospital he was charged with resisting an officer in the course of his duties. I would ask why they want to check your ID (politely) and insist they give you a reason. But if they don't, don't turn your back and walk away. It's like asking for a night stick in the back of your head.Ask a similar question