Presumably you’re using a workflow to take the user to the place where they can edit the event.
Put an “only when” condition on the workflow based on the date of the event related to the current date. Something like "only when current date < event date. Clicking on the “edit event” button after the event passed won’t do anything.
If you want to provide visual indications that clicking on the “edit event” button won’t do anything, then it’s best to just remove that button entirely. Go to the conditions tab in that button’s properties, add a condition using the same date logic, and set the visible to unchecked. Or you could set it to disabled if you want to leave the button on the page.