How do I create a custom field that selects a CiviCRM group
As you may already know, there is a field that will expose all groups that are mailing lists to the user and let them select, which one they want to subscribe to. You could add this field to the profile that you use for events. It is descirben on this page (see "Using a profile"). However, users would be presented with all public mailing groups available.

As an alternative, you could also create a custom field (I would recommend a contact field but you could also use an event field) and give the users the opportunity to tick that field/option. You could then create a smart (mailing) group (which is also described on the page linked above) that includes all people who selected the option.

Both options do not require any coding at all and can be done via the UI.