The Cool Horse has always been useful in fiction for heroes in all ages of literature, but fictional representations of the blessed steeds are often quite different to reality. In mounted stage combat, the horses are perfectly happy to just stand still next to each other while their riders (pretend to) hack away at each other, something of a contrast to the heat of battle. The riders/fighters have to simultaneously guide the horses into moving around each other so as to make it look like something's happening. Mounted combat is shown in varying degrees of realism, like in the rest of fiction. For help deciding how realistic a scene is, consulting the Useful Notes section on mounted combat may be helpful.
In Video Games, horsemen tend to be very expensive, fast moving and powerful units which are excellent if you can afford them... but also tend to come with one cheap opposing unit which can stop them.
And of course, nobody ever targets (or even accidentally hits) the horses themselves.
Semi-realistic depiction in the Two Towers movie of The Lord of the Rings. On one hand, the charge out of Helms Deep at the end, with the cavalry held close together in tight formation and essentially being used to force the infantry back, before eventually getting bogged down and into trouble when the orcs numbers and discipline begin to show, is fairly accurate. On the other hand, Gandalfs relief charge would probably have ended up a) making a sad retreat after dancing around a pikeline for a few hours or b) completely butchered.
Gandalfs charge had decidedly abnormal help in this regard however; Gandalf used the Uruk-Hais aversion to light against them. On the other hand, cavalry are also not good for charging over rough terrain; charging down a massive rocky hill like that would have risked several horses stumbling and breaking up the whole charge; horses are best suited to the plains, which, to be fair, constituted the majority of Rohan. Gandalf may simply not have had much of a choice of where to charge from.
It's not necessarily their aversion to light that made them do that. It was in part because they were looking straight at the sun. Try concentrating on fighting while you have a sudden bright light in your eyes.
J.R.R. Tolkien (The Lord of the Rings) and Robert Jordan (The Wheel of Time), who both have military experience and did their research, are known for using cavalry and other military techniques in a realistic manner. For comparison with the film example above, in the book of The Two Towers, Gandalf came not with Éomer's cavalry (who had joined King Théoden's forces earlier) but rather with a bunch of Huorns, against which the Orcs had no real defense. Also, Théoden did not wait for the enemy to enter his halls to use his cavalry, but made sorties several times through the battle, charging out and then retreating back to the Deep.
And whereas in the film of The Return Of The King, the Rohirrim somehow easily routed the much bigger army of Orcs only to get completely thrashed by the enormous Mûmakil (mounted elephants), in the book they spent most of the battle fighting other human cavalry and only took on the elephants when they had sufficient backup from Gondor.
The Belgariad and sequels/prequels, with emphasis on Algarian Light Cavalry and Mimbrate Arend Heavy Cavalry.
In Time Scout, like his Mongolian family, Skeeter can ride a horse in battle. One time, it was a trained warhorse.
Mounted combat is a staple of The Wheel of Time. Cavalry, both heavy and light, as well as mounted scouts are frequently important to various campaigns. For some nationalities, it's their hat.
Live Action TV
Power Rangers Samurai features this in the Clash of the Red Rangers movie, when the Samurai Rangers ride into battle against General Gut's Mooger army. This is among footage originally from its source series, Samurai Sentai Shinkenger.
Generally not used in Dungeons & Dragons as mounts are usually significantly weaker than the characters, and can be killed, even accidentally, with Fireballs and other such attacks. However, the Mounted Combat chain of feats is very powerful, and paladins can summon a Cool Horse. (A druid or ranger's animal companion could be a horse, too, being more powerful than a regular horse, especially if ridden by a druid.)
The drow use an interesting variant: instead of horses, they ride giant lizards.
Generally not much used in tabletop RPGs, period, at least not by player characters due to mounted combat training being something of a Useless Useful Skill to most general-purpose adventuring parties (which don't generally "just happen" to be dedicated cavalry units as well and in any case can expect to see a fair bit of action in places where mounts are either a liability or flat-out unavailable). Suitable NPCs in appropriate environments are a different story, but then again by virtue of being NPCs they don't quite "count" as much.
Age of Empires has cavalry used in various functions, often quite accurately pertaining to their function in real life. Light cavalry scout and chase down archers, knights are good against infantry and can also move fast to threaten archers, and are overall very powerful, expensive melee units, horse archers threaten slower-moving units, and there are a variety of special cavalry units unique to certain civilisations. All are vulnerable to spears.
Total War uses cavalry in different functions each game, as the setting and era changes each time and the games evolved themselves. A general rule of thumb from Shogun to Medieval II is that light cavalry flank and chase off archers, heavy cavalry see off lighter cavalry and can do the same roles better, with the exception of chasing archers, and horse archers stay away from foes and fire upon them out of range. Empire, of course, changes things again, being set in the age of gunpowder.
Fire Emblem has Cavaliers, Paladins, Great Knights, Nomads, Nomad Troopes, Rangers, Valkyries, and Mage Knights.
Mounted combat is an option in Koei's Dynasty Warriors and Samurai Warriors games. Some characters receive a great boost in fighting ability if they are mounted.
Mount & Blade is the single most realistic depiction of what actually fighting from horseback would be like in the video game industry, including horse archery and use of a lance in a battle.
The Elder Scrolls V: Skyrim was updated in June 2012 to include this, though mounted combat is still more challenging than fighting on foot. It does give the rider the advantage of mobility and power, as sweeping attacks from horseback do a lot more damage than attacks on foot.
In the Argent Tournament, players can joust against fellow tournament participants on horseback, as well as against the Scourge's undead minions in other daily quests.
Some bosses, such as Ley-Guardian Eregos, require players to use mounts, and use their mounts' abilities against the boss. Other bosses ride on mounts while attacking players; Iron Qon rides three different Quilen for the first three stages of the battle, then fights you on foot in the fourth and final stage (and with all three of the Quilen assisting him on Heroic).
In the Earthrager Ptah encounter, players can mount on a camel, enabling them to fight and cast spells while moving, although some of his abilities can dismount the player. There's an achievement for staying mounted for the entire battle against him.