Strictly speaking, Shadow doesn't cry — a single tear slips out. It happens in Sonic Adventure 2, while Sonic, Tails, Knuckles, Rouge and Robotnik are moving to destroy the Eclipse Cannon. Amy tries to talk Shadow into helping, and her heartfelt plea brushes against his memories of Maria Robotnik's death. That's what produces the tear.