When can I use 전데요 instead of 접니다? For example my teacher asked "우리 반에 IT 전공 하는 사람 누구예요?". Is it OK to answer "전데요"?
Adding to @MujjinGun's answer, I don't think "전데요" always has an arguing tone. It depends on your tone and when you use it. For example:
전데요, 왜 물어보세요? It's me. Why do you ask?
전데요, 왜요? It's me. Why?
전데요, 말하세요. It's me. Speak.
When you speak the above examples with rising intonation, of course it would sound argumentative and challenging.
However, there are other context where you use "전데요" in low-pitch falling intonation. For example:
선생님, 전데요. 오늘 아파서 학교 못 갈 거 같아요. Teacher, it's me. I can't go to school today because I am ill.
The context I can think of where it doesn't sound impolite:
(1) when you are not sure,
(2) when you want to ask a favor,
(3) when you did something wrong or there is an awkward situation that you have to explain.
"접니다" is not broadly used by a student when asked a question by a teacher. It sounds too formal. "저요" or "저예요" will be more idiomatic than "접니다" when a teacher asks a question, "우리 반에 IT 전공 하는 사람 누구예요?"
전데요 has an arguing tone, and it can be quite rude to say to a teacher. Rough translation would be "It's me, what about it?".
접니다 is using formal and polite speech level(하십시오체), and sound much more polite than 전데요.
In addition, 저예요 would be somewhere in between, using polite but informal speech level(해요체)