For following users we use an app that we designed it's called django-followit. Badges were part of the original CNPROG software, but were substantially rewritten.
The badges currently are not separated into another app, maybe it would be worthwhile to do, but not 100% sure. Take a look yourself - the badges code is defined in askbot/models/badges.py.