I wouldn't base it on EXP, since the curves are variable and it would be a LOT of work to list the EXP required for every character, for every level.
If you WANTED to do it using variables, you would save the actor's level into a variable, then have a script that compares the actor's current level with what's in that variable. If they're different, the actor has leveled up (and you'd need to reset that variable with the new level). However, that would require a variable per actor, and a parallel process common event that's continually running and checking on every frame, when you're really only going to level up after a fairly decent period of time, which is a huge waste.
If I needed to run something on the map every time someone levelled up, I would use a similar method to Andar's.