Add a custom VBO action
You can create custom VBO action by implementing hook_action_info() hook. Here are some useful links which can help you achieve what you want: 


Views Bulk Operations development guide (Drupal 7)

Programmatically adding and removing roles to users in Drupal
HOWTO assign a user to a role programatically


additionally, Examples module can help you to learn about Actions.