Step 1: create coupon code
To create discount code, access Discount code panel.
Update required fields for the discount code.
Step 2: assign coupon codes to event
In the editing page of the event you want to assign coupon, open the tab Discounts & fees, configure the Use Discount Code: field in the Event Pricing section.
In front-end, the coupon code field will be shown in the event registration form, user can add the coupon code to get discount.