You can automatically assign badges to users on completion of tasks, by creating pathways.

See Learning eXperience Builder tutorial