The biggest advantage of the mounted archers is that they control the battlefield. They decide if they're going to let you close for melee, they decide when the battle ends, and how.
We used this in our own game last weekend. In the desert, attacked by nomadic monsters. We were mounted.
They charged, we withdrew, then cut them to pieces. The horse's base move is so much more than the foot speed of most opponents it actually seems unfair. We pulled back 100 feet on a double move from the horses. That was more than a double move of theirs could close, yet still within the first range increment on our composite bows.
1) We shoot them.
2) They double move 60 or 80 feet to set up a charge.
3) We pull back 50 or 60 feet (single move for the horse) to be outside of charge range, then go back to step 1.
Rinse/repeat as needed.
The uglier tactic, in a world where people know about magic, is to single move your horse in close, fire at the enemy, then single move your horse back out again. Ideally, the "out" in that sentence is "out of sight".
Mount an attack, with troops staging for a major combat, and watch while the enemy casters throw up their battle-magic protections. Once they're ready, you withdraw and wait 10 minutes, then do it again. Rinse/repeat until the enemy has no more battle magic preps to cast, then follow through with that attack. (I did say that it was an uglier tactic, didn't I?)
Both of these approaches play out far poorer in an underground setting, as there may not be a way to be beyond charge range and still have a shot, nor is it so easy to withdraw beyond hope of pursuit.
Bringing in thoughts from the archery thread, it makes me harken back to older editions, where ranges indoor and underground were cut in thirds. Arrows, to travel the longer distances, need a certain amount of ceiling clearance. The "arch" in "archery" comes into play.
Not a consideration in 3.* though, but line of sight still is.