Drawing from our own history, rife with war, may I mention that we have indeed used War Boars before, although more accurately, we called them War Pigs. They were used by the Roman army because, reportedly, elephants became very frightened by squealing pigs. They would light the pigs on fire or send them in large numbers at the war elephants, breaking their charge. As Li Jun has mentioned, they will also be great at breaking horse formations as well.
Historical Weight Comparison, and Reality-Check on Boars as Mounts
In our own history, we have bred pigs up to 2500 lbs, like the one below, Big Bill:
The largest wild boars ever caught can weight up to 700 pounds
If we compare that to the weight of a warhorse:
By the 14th century, an average warhorse would weigh between 1,200 and 1,400 pounds and stand approximately 14 to 15 hands. When the knight struck a conventionally mounted opponent, the impact could be devastating.
Based on weight alone, orcs could probably easily breed boars from their wild 600-700 pound versions to match the weight of a warhorse. They would be devastating on the battlefield, and have an advantage over horses: their larger sizes would make it more likely for them to survive projectile damage from things like arrows. Alternatively though, they would be harder to fit with armor due to their large size, compared to a horse.
Pigs Calvary vs Horse Calvary
Pigs will eat anything. As such, War Boars would probably be useful in times where resources are short. Horses, on the other hand, require a special diet to stay healthy, and are much more difficult to groom and care for.
Boars cannot run as fast, or as long as horses. Boars should be used for short-distance charges, or properly timed ambushes, as they cannot be used to charge in from a long distance.
Boars do have one big factor over horses: fear factor. A boar has a more ferocious reputation than horses, and imagining a massive boar charging over is terrifying. This is definitely compounded by the large tusks, as a horse rider would generally prefer spears or lances, but a boar with tusks could easily skewer multiple people itself, combined with a terrifying orc warrior rider.
Boars also have another natural advantage over horses: leg structure. Horses have especially weak legs, which also cannot be armored. They can be easily disrupted with the use of caltrops or, anti-calvary weapons like the zhanmaodao, and ancient oriental weapon made to chop the horse's legs. Horses also have a lot of issues with terrain, and are prone to pileups if their charge is stopped midway. Boars instead have better durability due to their legs being easier to armor, and are thus much more difficult to stop.
Boars are terrible for transport purposes, as they are not built for long distance like horses. They should not be used like traditional cavalry, as they are too aggressive. If this point can be solved with breeding over time, they might make good cavalry for shorter distance battles, but might never have as much mobility or endurance as a horse-based cavalry.
All in all, a boar as a mount is not as mobile or capable of long distance travel as a horse, but its ferocity and powerful natural combat equipment gives it the edge in formation disruption, even against larger animals like elephants. It is also incredibly durable compared to a horse, with less obvious weak points, making them difficult to stop once a charge is started. They are also easy to raise and feed (especially considering Orcs, who may or may not have a developed wheat industry).
These points support Boars being used as a sort of defense force. They can be easily sustained on many different food sources in daily life, can be released to break charges from the enemy on their own, can be set up for short charges and ambushes, and are not great for transport purposes compared to more mild-mannered horses. They also invoke a higher fear factor than horses, and can be used to break apart formations as well. Also, if they are established as a defense force in orc settlements, a large number of them can be kept, as Joe Bloggs has mentioned, "imagine all the food when a warboar ‘retires’!!". When they are not used for war, they can be good livestock for the orcs to raise, forming a cycle of sorts, and can be quickly re-purposed for war when needed.
A secondary tactic, would probably be a swarm tactic. They can swarm in with higher numbers than traditional cavalry, and are incredibly difficult for the enemy to stop, possessing less weak points than horses. This can disrupt and break enemy formations, and throw them into chaos.
If they are to be established as a proper cavalry attack force, the orcs must first find a way to properly rein in their aggressive tempers, and breed species of boar with higher endurance. If they are used as an attack force, they will probably retain their role as a formation breaker, rather than a mobile force, but will be incredibly deadly and very difficult to stop.