Bud slapped Todd Amos because Bud was upset about Todd ramming a pencil up his nose. This particular event happens in chapter 2. Bud has just been adopted from the orphanage, and he quickly finds out that his new big brother is a bully. Bud tells readers that he woke up to find that Todd Amos was shoving a pencil up Bud's nose while he slept. Todd is amazed at how far up he could get the pencil. Todd laughs about the incident and then calls Bud "Buddy."
Bud was mad about the pencil, but being called "Buddy" pushes him over the edge. Bud takes action and takes a swing at Todd's head. Unfortunately, Bud doesn't keep his fist closed, so his punch ends up being a slap. Todd's mother eventually enters into the fray and punishes Bud by locking him in the shed.
It is possible that this question is asking about what Bud does to Todd in chapter 4. Bud breaks himself out of the shed, and he then sneaks back into the Amos household in order to retrieve his suitcase. While in the house, Bud fills a container with warm water and sneaks into Todd's room. Bud's goal is to get Todd to urinate in bed, since Todd told an earlier lie that Bud was a bed wetter. Bud tries multiple times to get Todd to wet the bed, and Bud is finally successful after pouring the warm water on top of Todd's pajama pants.
He smiled and the warm water from the jelly jar opened that little valve up and ... woop, zoop, sloop ... he soaked his sheets!