"He was just having a ball, splashing in every puddle," Cunningham said.
The boy's father, Bill Richard, released a statement thanking friends, family and strangers for their support.
Richard's wife, Denise, and the couple's 6-year-old daughter, Jane, suffered serious injuries in the blasts. Their older son, Henry, wasn't hurt. Two neighbors said Jane lost one of her legs in the attack.
"My dear son, Martin, has died from injuries sustained in the attack on Boston," Richard said. "My wife and daughter are both recovering from serious injuries. We thank our family and friends, those we know and those we have never met, for their thoughts and prayers. I ask that you continue to pray for my family as we remember Martin."
U.S. Rep. Stephen Lynch, a family friend, said Martin and his family were trying to get over the race barriers and into the street after the first blast, when the second bomb struck.
"They were looking in the crowd as the runners were coming to see if they could identify some of their friends when the bomb hit," said Lynch, who has known the Richards for 25 years.
Bill Richard, a runner and cycling enthusiast who did not run the race, had to have several ball bearings removed from his leg, Lynch said.
On Tuesday, a candle burned on the stoop of the family's single-family home in the city's Dorchester section, and the word "Peace" was written in chalk on the front walkway. A child's bicycle helmet lay overturned near the front lawn.
At a nearby park, "Pray for Martin" was written in large block letters on the pavement. Mourners later gathered for a candlelight vigil in the neighborhood.