1. What did you get for your birthday?

2. What did you get on your birthday?

(Which one is right? Are both right? What is a slight difference between them?)

Both are right. They're so close in meaning that they are both used and essentially mean the same.

1. is asking specifically about the birthday presents you received.

2. is asking what you received on your birthday.