WHEN condition must be in the definition part, not in the body. They can only by used for row trigger.
create or replace
TRIGGER SETCOMISSIONRATE
AFTER INSERT ON USERS
FOR EACH ROW
WHEN (NEW.role_id = 2)
BEGIN
INSERT INTO COMISSION_RATE
(username,
comission_rate)
VALUES (
:NEW.username,
0)
END;