It's true that you can sue the police for false arrest, provided that your situation meets the right criteria.
While courts often grant law enforcement immunity as to not hinder their investigative duties, that immunity is qualified, meaning that police officers may not freely and willingly violate an individual's rights.
When an officer engages in such conduct, an individual may bring a lawsuit under 42 U.S.C. 1983, which makes it illegal for government employees to deprive an individual of his rights under the Constitution.
To legally arrest an individual, police must first have probable cause. Without probable cause, an arrest violates the Fourth Amendment's prohibition against unreasonable seizure, resulting in an actionable claim for false arrest.
Keep in mind that, if prosecutors choose not to move forward, or a new suspect is later found, an individual does not automatically become the victim of a false arrest.
As long as the arresting officer reasonably believed the available evidence to be accurate at the time of arrest, then it's irrelevant whether it turns out to be untrue later in the investigation.
There, however, is one exception to this rule.
Because it requires evidence of criminal activity, probable cause does not exist if an individual has a clearly established legal right to engage in the activity that prompted the arrest.
This is even if the arresting officer believed the individual to be engaging in illegal activity.
So while you can sue the cops for false arrest and a variety of related claims, you may only do so in limited situations. Not every wrongful arrest is illegal.