Drupal - How to implement a reputation based system with badges in Drupal similar to StackExchange sites?
There's the User Points module and the User Badges module, though the 7.x version of User Badges is not suitable for production yet (as of June 4, 2012).
Thankfully, User Points integrates with the Rules module, which allows you to greatly customize the ways users gain (or possibly lose) points.
There's also a collection of contributed modules for userpoints of varying stability. You can certainly set up some amazing stuff with these modules, but make sure to carefully test your implementation-- though the modules are well written and fairly stable, there's still a lot that can go wrong so make sure to verify everything works properly.
For the badges, there is the Achievements module.
The Achievements module offers the ability to create achievements and badges similar to systems seen on Xbox 360, Playstation 3, Foursquare, Gowalla, GetGlue, and more. For a Drupal site, this could mean commenting a certain number of times, starting a forum topic, visiting the site every day of the week, or anything else that can be tracked and coded.