I've always kept one unit in my coastal cities, because I have been surprised by a galley+escorts a time or two. Lately I have been more vigilant, which leads to my second observation.
In my experience, the AI loves an unprotected city. It will look for one that is "close" to the coast, if not right on the coast. I've not seen it go for my capital if another coastal city is unprotected. I remember one game where I moved defenders around, sliding them from city to city, and convinced myself that the AI changed its target to go for the unprotected one. I might have been fooling myself, though.
Another trend, I've seen in my last couple games. The AI loves to attack my island towns, especially on 3, 4, or 5 tile islands. It must figure that it will be hard for me to reinforce.
tl;dr - AI tries to find your least defended city and attack it, in my experience.