How to add custom badges depending on the amount of User Points earned?
Why not simply use the user_badges module which explicitly integrates with userpoints? 


userpoints_badges
Integrates Userpoints with the User Badges module.



Check out the userpoints contrib modules list, there may be more tools in there you can use..