What determines your badge level in a given subject?
Level badges are awarded based on the total amount of karma you have accumulated in a specific subject.
You earn karma by writing answers or by editing answers written by someone else. Each answer will get you
After that, any "like" that the answer gets will be awarded
You can read a more detailed explanation on how karma, badges, and levels work here