A couple comments:
$_SESSION['languages_code'] is probably more user-friendly than trying to guess which languages_id to use.

It would be more efficient to hook the NOTIFY_MODULE_CREATE_ACCOUNT_ADDED_CUSTOMER_RECORD notifier point with an observer class that takes the passed parameters and simply updates the customers table to set the desired new group number there, since that notifier point fires immediately after the customer is created.
And using an observer class means less need to touch any core files, which of course results in easier upgrades ;)