Similar to wodinoneeye said.
In real life neutral countries exist because either:
- The conflict hasn't expanded yet enough to affect them.
- They're strong enough to repel any invasion if they get involved (they could even seriously imbalance the war if they take side).
- Most of the involved parties don't want anything of that country (i.e. why would Israel or Palestine want to take umm... Mexico?) or are emotionally attached to them (emotion != logic).
- It's more beneficial to have them as an independent country than to have them take your orders. May be because their know how is too high and can't be used appropiately if you invade them, or their citizens could start small acts of terrors during the occupation, or guerrilla style fighting.
For a game, points 2 and 4 are the most interesting. Point 4 can actually be very fun and make the player go through a living hell.
Point 2 is easy. If you attack, you will be obliterated.
Point 4 is fun. You can attack, you may win. But pay the consequences until you release that land back. Random sabotages, slowdown of your resources gathering or slower building of units, critical unit-making buildings randomly exploding, inability to develop certain technologies. Allow the development of technologies or gathering the goods they offered when they were neutral, but at a higher price (or getting developed at a slower rate), etc.
Point 3 is possible if the game has a story. Get the player to actually love a civilization good enough so that most players will feel bad about invading it and prefer working alongside them. But this is really hard to execute well.