MGE ai (the only one I have ever played) is hostile at all times. If you want to use diplomacy to your advantage, there are a few things you can do.
One is you can sign cease fires and peace treaties if you (like John Lennon) just want a little peace. Also, when offered peace, always say "no" the first time. They may offer you $$$$. If they just accept your refusal, no loss, the ai was going to break the treaty and attack anyway! Another upside here is that if you play in representative government, you are not "stuck" with a permenant peace treaty: The ai will attack you sooner or later. Moreover, after the ai has broken a few treaties with you, the sentate becomes much more likely to allow you to continue "peace keeping." (the last game I played all the way to the end, I was allowed to continue fighting through 10 out of 11 pleas for peace from the treacherous Russians!)
Trade techs can be advantageous. On MGE it will not make the ai's less hostile, they will all be enraged by 1AD regardless of what you do. For this reason, I would not recommend trading techs to make friends, only if they are offering something you really want.
One really helpful thing you can do with diplomacy is trade maps. This allows you to both plan your attacks and find demanding cities for your trade routes. The ai will not trade maps with you (or at least has not with me) on MGE until you get their attitude up to worshipful. To do this, you have to gift them money/tech (I have never tried with units).
Finally, you can use diplomacy to give away your techs. Seems irresponsible? Maybe, but what happens is that the cost for your to research your next tech is (partly) derived from how far ahead/behind the other civs you are in terms of # of techs. Thus it is possible to decrease your research costs by giving ai civs techs. To be exact, there is, at any given time, a particular "key civ" whose tech level is the basis of your research cost. There are threads on this subject both in the strategy section of this board and on the Aplyton site.