There is an onEventClick event handler which you can use to call a server-side endpoint using AJAX (to make the change persistent). You can also change the event color using DayPilot.Scheduler.events.update():
dp.onEventClick = function(args) {
$.post("changeColor?id=" + args.e.data.id, function(data) {
args.e.data.backColor = "red";
dp.events.update(args.e);
});
};