Legally insider trading is something pretty specific involving having access to inside information that not everyone has access to. Courts have acted differently in different situations depending on duty to the corporation for those affiliated. However for anyone without a duty to keep the information public, you can trade on whatever information you want. Requires the information be nonpublic and that the trader have a duty (usually, an insider giving inside stock tips to a friend who makes the trades is still acting illegally).
Morally, it depends on your ethical framework. I don’t think insider trading that doesn’t fit the definition of illegal insider trading is immoral, not because it’s legal but because the legal definition is pretty robust as to align with moral culpability.