The simple answer is that Sonic doesn't want to get caught in one of Amy's famous hugs!
Amy is head-over-heels for Sonic and constantly chases after him, while Sonic values his freedom and prefers to keep his distance. His running is less about dislike and more about avoiding the enthusiastic affection—and the awkwardness—that comes with it. It's one of the series' longest-running gags.