Stephen Bainbridge has a good post on how to analyze when trading on non-public information should be illegal and when it is just the market functioning as it should. The key is whether someone other than the trader should be considered to have a "property right" in the information.
I think this is right, but would add that this just pushes the analysis to the next stage: who has property rights in information? Where the information is received as a result of a fiduciary role (e.g., a lawyer knowing something from a client or a manager knowing something the firm has an interest in keeping secret), then it is pretty easy. But there will be border line cases.