It depends on the exact circumstances of the game, but if you're going for a peaceful game and you have military-minded neighbors, as a general rule of thumb I would say try to stay on the good side of strong civs that are close to you. If they're both on your borders, it may be wise to go with the stronger of the two. If you stay neutral, you may just end up damaging relations with both, only to have them gang up on you later. Do you have the defensive capabilities to bunker down and declare war on the weaker neighbor?