I don't know about G+K (I haven't downloaded it yet) but the AI pays attention to *who* declared war on *whom*.
If you declare war on the AI, you get negative diplomatic modifiers depending on the personality of AI leaders (Ghandi dislikes warmongering more than, say, Alex).
If the AI declares war on YOU (as much as that usually sucks) they also just declared open season on themselves diplomatically, and you can basically do whatever you want to them - short of completely wipe them out - with no diplomatic penalties.
If you do completely wipe them out, you suffer diplomatic consequences, even if they DoW'd you in the first place. Just leave one wimpy city off in a corner.
Also, the AI seems to notice when you are getting to be the big kid on the block and this is the modifier they use if you achieved that through war (you'll get the "too many cities" modifier if you did it through rexing), although that seems to only extend to civs whom you've already met - new civs seem to start with a blank slate.
City states don't seem to mind if you "take care of someone" for a rival CS once or twice, but if you start attacking city states without provocation they'll gang up on you too.
So, the big no-no's:
Declaring war on someone, formally or informally (going into their territory without an open borders agreement, stuff like that)
Completely wiping out a Civ (taking their last city)
Obvious things, like breaking a peace treaty before it expires (the cease-fire thingy after a war, not the general peacetime state of contact that is the norm)
I don't know because I usually go for science or domination (and domination games are over before you get nukes) but most Civ games give huge diplomatic penalties for ever using a nuclear weapon.
Sneaky Loopholes:
If the AI DoW's you, you can take all of his cities except the last one
I'm not 100% sure, but I believe you can even repeatedly refuse to sign peace treaties the AI offers you when you are kicking their a _ _ without penalty.
Sometimes, for whatever reason (usually because you are neighbors and THEY are looking for an excuse to attack you) the AI will just suddenly look for reasons to be upset at you and if you've taken a few cities by force in your game this modifier might show up.
Basically, wait until the AI decides to be Nazi Gemany and seize your Sudetenland. You get to be Winston Churchill and tell the AI "OH NO YOU DIDN'T!"