I know that higher levels AIs get bonuses. But do they actually play smarter? It seems a little unfair for the AIs to get bonuses. Is the idea just that to beat them, a player has to be so good that he can still win with a handicap?
There are definitely differences in AI behavior between difficulties - in particular, the AI is far more aggressive in their behavior: they will scheme against you and actively exploit your weaknesses (e.g. attack you if your army is weak). This behavior could be said to be "smarter". It's a completely different experience, and if you find yourself winning too easily I recommend moving to a higher difficulty for more engaging gameplay.
As to whether the AI is also smarter in micro-decisions - such as tactical combat or citizen allocation - I think the answer is no - it behaves very similarly in these regards.
I've looked through the source code for Civ5 that was released recently, and there are very few changes in AI behavior depending on difficulty level. The following is basically all I could find:
- determining the defensive reserve of units: 1 unit is added for each difficulty level above Chieftain
- calculating the size of attack force: again, 1 unit is added for each level above Chieftain
- calculating the number of cities for expansion strategy: 1 additional city for each level above Prince
- AI upgrades units faster (i.e. attempts more unit upgrades per turn) at Emperor and above
Thus, with the exception of above, the handicaps and bonuses (summarized here: http://www.civfanatics.com/civ5/difficulties) are the only determinant of difficulty.
An interesting corollary is that, contrary to popular opinion, diplomatic AI actually doesn't change starting from Prince and above. The seeming aggressiveness of AI at higher levels is caused by its faster expansion (contested borders sooner) and faster military buildup (so the player is considered weakling sooner)
The AI both plays smarter, and gets bonuses to boot. AIs will get bonuses in almost any game you can imagine, because it is much easier to just add 100 to ai_starting_gold than it is to program a more sophisticated decision tree/graph/process/squid.
Fortunately, the AI for Civ5 will also play smarter - or, at least, give you worse trades, be more willing to go to war against you, and kick you when you're down. (My current game on Emperor has occasionally had four different AI opponents at war with me at the same time, though at least two of them were so far away as to be harmless.)