What happens when a clone soldier (clonetroopers and stormtroopers included) dies? Does the republic/empire have a mass body disposal facility? Do they bury the dead troopers? Is the equipment issued to this dead soldier salvaged and handed to one of his brothers?
In the Star Wars book "Imperial Commando: 501st", several Clone Commando warriors insist on a cremation for their fallen colleague. One of their number describe this (somewhat contemptuously) as a "jedi tradition" which strongly suggests that the normal practice is simply to bury their dead in-situ.
...Ennen and Bry had been trained by a Corellian sergeant. It showed. Their attitudes were Corellian; they'd have fitted in seamlessly in any Corellian town.
"Cremation," Ennen said. "I don't care how we do it, but I want him to have a proper cremation."
Later in the same series, come other Clone Troopers talk about giving another fallen comrade a "decent burial", somewhat unsentimentally after removing his armour and kit.
"ARC trooper Lieutenant Alpha-Thirty died of his injuries following an unknown incident, okay?" A'den announced pointedly. "He was too decomposed to ascertain a cause of death. But I recovered his armor and I'm returning his tally to SO Brigade for records purposes. Got it? Because if you didn't, I can repeat it even more slowly."
Fi raised an eyebrow. "He looks pretty decomposed to me. We'll give him a decent burial. Can I have his boots and kama?"
In the Darth Vader and the Ghost Prison comic series, an Imperial officer notes that there's an Imperial Crematorium on Coruscant, claiming that over one hundred officers and troopers were cremated in the space of a short time. I would doubt this practice would be used for all deceased Imperial troops, but I would assume that higher-ranking officers would be buried, and most stormtroopers and junior officers would be buried or cremated with some form of ceremony. At the least, someone would be in charge of notifying the troops' families (at least, those troopers who weren't clones). Not doing so would likely exacerbate public unrest and resentment toward the Empire by those whose family members died in Imperial service.
Clone troopers, not having families, would likely be buried or cremated according to the traditions/preferences of their unit, as other answerers have noted. In cases where retrieval would be unfeasible (i.e. deaths in space) or dangerous (troopers killed by biological weapons), the most likely response would be to leave them where they lay or bury them in mass graves.
It appears that their bodies are reused, i don't know in what way but in a novel of star wars there is a piece about a clone trooper, Unit: CT-914 who was grieving about his brother (CT-915) and he died several days later.
This is a piece from the text i found:"A short time later, CT-914's platoon was ambushed by Confederate forces in a guerrilla attack. Most of the platoon, including CT-914, was killed, and their remains were placed in recycling vats in order to salvage their biological material."