When should I pay to invade a neutral country in Axis and Allies
At a basic level, I weigh the 3 IPC payment and the opportunity cost of the units I used to invade it against the benefit to be gained. That's pretty generic so some examples might help:


As Japan, I often find myself invading Panama in the mid- to late-game because my navy has nothing else useful to do. If America doesn't have any tanks in Western US, chooses not to use them, or if I have enough extra transports that I was able to land a blocking infantry in Mexico, then America will be unable to kill any units that landed in Panama. In this case, I'll typically invade Venezuela on the next turn and then take Brazil. The 3 IPCs from Brazil are an equal trade for the 3 I lose for invading a neutral, the value from really throwing a monkey wrench into America's plans is high, and the opportunity cost was low, since the navy wasn't busy anyway.
As the Allies I've landed in Spain before just to open up another front for Germany to defend. It can be very difficult to stage a successful amphibious invasion because of the lame attacking power of infantry, the one tank per transport limit, and the ability to lose your entire air force because of the no retreat rule. So to prevent having to attack, I've invaded Spain as the UK and dumped a full load of infantry followed by the US on their turn. Now Germany either has to counter attack (with only the infantry in France and without any tanks in EEU or further East) or give me a foothold in Europe I'll likely never give back. 
I've also played with a house rule before where land units could cross the Bosporus if Turkey was occupied. So I tried invading Turkey as Germany to help me ferry troops into Africa. This didn't work that well as it's still a long way from the Fatherland.