Cavalry cut down musketmen like grass. They're still effective against riflemen, given superior numbers. Only infantry can stop Cavalry cold. The AI does a poor job of upgrading, so even if they do have riflemen, it's usually 1 per city, with musketmen and pikemen underneath.
I usually avoid ancient warfare, unless I'm the Iroquois or Persians. I will often fight in the Middle Ages, since Knights do rock (great combo of attack, defense and speed). The Cavalry rush (pre-Nationalism) is probably the most effective time to fight - I spend a large part of the middle ages pumping out knights, which become Cavalry for 20gold each, so I have a lot of Cav.
I usually do not fight with regular tanks, though it can be done, but instead wait for Modern Armor... if I fight in Modern Times at all. By then I'm strong enough I no longer need to fight, and only do so if attacked or if I decide "what the hell?" and go for domination.
So to answer the original question, yeah there are times were offensive units have the advantage: Cavalry, pre-nationalism is #1. And like I said, build enough Cav, and riflemen won't stop them either. Also, if you are lucky enough to get Knights in decent numbers before others get pikemen (rare, but possible), they do terrible, awful things to spearmen. Finally, Modern Armor vs. anything except for Mech. Infantry or enemy Modern Armor.
-Arrian