The easiest way I can think of would be to use the Automation plugin to trigger a Zapier webhook when a user is added to a group. Zapier could then be configured to make a PUT request to Discourse to update the user’s preferences.
I haven’t tried this exact scenario yet, but it should work.