Prosecutors are usually protected from possible civil liability because they can claim immunity. However, immunity only applies to their conduct as litigators, not as investigators and defining the line between one and the other is a matter of much debate.
There are many cases out there that discuss the issue and now the Court of Appeals for the Third Circuit has added a new one. In a case Weimer v. County of Fayette, Pennsylvania, the court examines the claim of plaintiff Crystal Dawn Weimer who spent more than eleven years in prison, and then, after her convictions were vacated, filed suit under 42 U.S.C. § 1983, alleging that the County of Fayette, Pennsylvania; its former District Attorney, Nancy Vernon; the City of Connellsville; and several city and state police officers violated her rights under the U.S. Constitution and Pennsylvania law.
The Court found that certain aspects of the prosecutors conduct were protected by immunity, but many others were not and remanded the case for further proceedings.
You can read more about the case here, where you can also find an embedded copy of the opinion.