How to let a user choose a role after their very first login? I want to let users to select their role. There are 4 available roles (created by me as an admin) and the selection should be done after first login, so not on the registration form.

Can anyone help me to resolve this problem?

Note: the question let the user choose role upon registration is not exactly the same as my question here: that one contains "... with their chosen role ...", which is clearly something they entered on the registration form.
I am not sure, but you can try somthing lke this: create form with Form API, on submission change value of Role array in user object.
Example:

function MENUCALLBACKNAME($form, &amp;$form_state, $user) {
 $form = array();
 $form['role'] = array(
  '#title' =&gt; t('select role'),
  '#type' =&gt; 'select',
  '#options' =&gt; //Array of your roles like array(id_of_role =&gt; t('Name of Role'), ...)
 );

 $form['uid'] = array(
  '#type' =&gt; 'value',
  '#value' =&gt; $user-&gt;uid,
 );

 $form['submit'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Choose'),
 );

 return $form;
}

function MENUCALLBACKNAME_submit($form, &amp;$form_state) {
 $uid = $form_state['values']['uid'];
 $role = $form_state['values']['role'];

 $account = user_load($uid);

 $account-&gt;roles = $role;
 user_save($account);
 $form_state['redirect'] = 'SOME PATH';
}