The most important thing you need to know about whether or not you should talk to investigators is something you'll hear first from the police who are arresting you: "You have the right to remain silent." The tricky part is remembering that the only words that should come out of your mouth are, "I want my lawyer and won't answer any questions."
This video, in which James Duane explains why innocent people should never talk to the police, is a useful primer. (Thanks to commenter Daniel Wahl for reminding us of this.)