There are a few factors that go into the disposal (or lack thereof) of horses on battlefields. Era is the most important, but location and timing also play into it.
During the Napoleonic Wars, horses were either burned or left where they died after having their saddles looted by the conquering army or civilians after the army moved on. Captain Jean-Roche Coignet, a French Captain who wrote about his experiences, recalled after the Battle of Marengo in 1800,
"Men and horses were laid pell-mell in the same heap, and set on fire in order to preserve us from pestilence."
Disease was a major concern in dealing with the battlefield dead. Horses often died from glanders or other communicable diseases that could spread among the ranks if the corpses were not burned. This method also had the benefit of getting rid of the rotting smell and replacing it instead with the odor of burning horseflesh.
When armies needed to move quickly, such as the Retreat from Moscow by the Napoleonic Forces in 1812, horses were left to rot. Observing casualties two months after the battle of Borodino, the French General Philippe de Ségur stated,
"When von Borcke was riding on horseback over the battle-field on the 5th day after the battle, he saw wounded soldiers lying alongside the cadaver of a horse, gnawing at its flesh."
Thousands of horses died at the Battle of Waterloo in July 1815. Both the bones of men and their animal companions were left in the fields a year later. A November 1822 edition of the New Annual Register reported that around a million 'bushels' of human and inhuman bones were imported into England and sent to the Yorkshire bone grinders under contract to create fertilizer for the farmers of the area. The Register claimed these bones were more substantial manure than any other substance at the time.
As warfare evolved horses became more and more important on the battlefield. By the time of the American Civil War, horses were essential for cavalry and artillery transportation. If you killed a horse carrying a piece of artillery it becomes effectively immobile until the dead horse is removed and a replacement is hitched up. If you killed the horse of cavalry units they become as useful as standard infantrymen.
The National Parks Services claims that out of the three million horses, donkeys, and mules that served in the Civil War half died. At the Battle of Gettysburg, there are estimates of 5,000 horse casualties. Many were piled up and doused with kerosene creating a pile of flaming horses that burned for two weeks.
Lydia Leister had her home taken over as a headquarters by Union general George Meade during the Battle of Gettysburg. She testified that it took two years for the 17 horses laying in her front yard to rot away. She sold the bones weighing in at 750 pounds.
The First World War also saw massive horse casualties with estimates up to 8 million. By then it was standard in British Basic Field Manuals to burn horse carcasses if possible. Burying the horses and covering them in quicklime was another option with the main concern being eliminating the spread of communicable diseases.
There are also photographs of Papier-mâché decoy horse corpses used as sniping blinds by the British in the First World war.
In summary, horses were a key component of 19th and early 20th century armies which made their large bodies optimal targets. With the sheer mass of horses making disposal a challenge and the chaos of war, they were often left to rot if they weren't burned, being dealt with after they had fully decomposed.
Sources:
“Basic Field Manual,” Vol V Transport, 1929
https://newsinteractive.post-gazette.com/gettysburg/
Captain Coignet by Jean Roch-Coignet
Napoleon’s Campaign in Russia Anno 1812: Medico –Historical by Achillles Rose
The New Annual Register, or General Repository of History, Politics, Arts, Sciences and Literature for the Year 1822
A Strange and Blighted Land: Gettysburg: The Aftermath of a Battle by Gregory A. Coco
As an interesting aside and illustration of the issues with e.g. horse carcasses.
In 1710 during the Great Northern War the Danish had re-entered the conflict following the Swedish defeat at Poltava in 1709, the Danish having been knocked out once already earlier in the conflict. The intervention didn't turn out so hot and the policy of "Swedification" that had taken place since the Scanian territories had last been fought over in the Scanian war of 1676-79 meant there was little popular support. Despite the Swedish manpower sources being stretched to the limits replacement units were found to resist the invasion.
Anyway, the Danish invasion attempt had suffered a defeat at the battle of Helsingborg Feb. 28th (or 10 March if you were a filthy Papist and used the Gregorian calender). The troops fled into the fortifications and town of Helsingborg from where they were evacuated in the following days as it was possible the army would be stranded in enemy territory if the Swedish fleet could cut communications to Denmark.
However, the Danish could not take all their horses with them, nor the greater part of the provisions and supply train. So as were customary they burnt the supplies and the horses were slaughtered to not give valuable resources to the enemy, around 5000 horses were left behind, only the officer's horses were spared and evacuated. Or more properly *parts of* 5000 horses were left behind. Because the Danish decided to put some effort into the job, neighbourly love and all that. So they filled the city's waterwells and the basements of the houses with dismembered horsecarcasses and poured grain and gunpowder into the streets to mix with mud and horseblood. Effectively ruining the town as location for projecting military power for some time.
The Swedish regiment that were to camp in the city couldn't stand the stench and vacated it. The soldiers refused orders to clean it up and likewise the town burghers would have none of it. At the time taking care of horses remains was considered a deeply shameful job no respectable person would do (only a few steps up from being an executioner, a job so shameful you could avoid the death penalty by becoming one). It took repeated threats to force the surrounding peasant villages to take care of the problem and corpses from the battle as well as the horses were dumped in old moats surrounding the town. Ironically the main water source was close to the moat and almost 200 inhabitants died of infectious deceases in the following months.