Essentially what it boils down to - was the crime something that affected the nation, or just the state? If the crime involves national (federal) land, national (federal) employees, national (federal) funds, crossing state lines, etc then its a federal crime. If the crime was local its state.
I think one exception is kidnapping though, which I believe is a federal crime even if totally localized within a state.