Step 1: create coupon code
To create discount code, access Discount code panel.

Create new coupon code
Update required fields for the discount code.

Add new discount code form
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.

Configure discounts and fee for event
In front-end, the coupon code field will be shown in the event registration form, user can add the coupon code to get discount.

Add counpon code to checkout