Programmatically assigning new users to groups
The user ID is definitely available, as hook_user_insert() is called after the user data has been committed to the database.

I've just put the following code into a test module called foo:

function foo_user_insert(&amp;$edit, $account, $category) {
  dpm($account);
}


Then I created an account through the admin UI and the output from dpm() looks like this:



So as you can see, the roles are available too.

If you're not familiar with the dpm() function, it's part of the Devel module. It will print any PHP variable to the standard messages area and will display objects/arrays like the screen shot above. It should help you with most of your debugging needs.