Diplomacy engine is based on a system of positive and negative factors which make AI Leaders more or less friendly towards a player. Every diplomatic action has a reaction - and you can see all the time the summarized effect of all your actions - with point value of every one of them. Positive value (green one) is good, while negative (red) is bad. If summarized effect is positive AI rather likes you, if it's negative - as you can guess, AI doesn't like you at all.
There are lot of factors in this system, but due to detailed info how the relationship between AI and you look like you now know not only is it friendly or not, but you also why he hates/loves you.
What is very important - these relationships are connected with your associations with other Leaders - often waging war with correct enemy or avoiding trading with the wrong civilization makes your diplomacy much simpler. One of the most important factors of relationships is religion - civilizations with this same state religions tend to like each other and don't like a unbelievers.
Every Leader has unique personality and behaves differently - Montezuma is a crazy, unpredictable person who can go to war with you without any apparent reason, Ghandi is opposite - an easy going, friendly AI, looking for cooperation and avoiding war whenever possible. These personalities also react differently on this same factor - for example Isabella is extremely interested in religion issues, while Mao is rather indifferent in what you believe.
As usual in this game, also in diplomacy you should define your own goals. What should be taken into consideration?
- Look for friends and make coalitions with them- the religion helps a lot with this;
- Avoid situation when friends hate each other - you will have to choose sooner or later whom you will follow;
- Keep friend happy - give them technologies when they ask (unless AI asks too much), start wars when they ask and so on. In one word - invest;
- If you need help - ask a friend. They can even give you some things for free (as they like to take from you);
- Choose your enemies as carefully as you choose your friends;
- Try to make enemies hate each other (bribes and threats are very useful). Divide et impera;
- In time of war it is a good idea to secure flanks and rear borders by finding other nations something to do - a small war is ideal. AI loves backstabbing - but when it has other war to win, it is usually not a threat;
- Except specific situations, agree on opening borders. That helps to improve relationships, gives extra income from trade routs, and gives opportunities to convert and to spy.
One more, very important thing - although AIs are reasonably trustworthy (except Montezuma) the most they respect is power. If your army is many times smaller than your neighbours, most of them aren't able to resist an easy prey.