Within Marvel or at least Thor's corner of Marvel Thor is a bona fide god and Odin is the creator of Earth and humanity. One of Odin's mythological titles was "Lord of Midgard." From at least a religious perspective, gods are usually considered higher beings with authority superseding mortal authority. An reason given for why superheros do not kill or take certain actions is they are not gods. They are not supposed to decide who lives or dies or overrule local governments.
Yet, Thor is a god. He is the son the Earth Mother Gaea and stand to inherit all authority from Odin and Gaea. He is usually respectful of mortal law, but now much does it really apply to him?
Legally speaking....Thor is still bound by mortal laws. Criminal laws are enforceable on all those who "lives or sojourns" in a particular jurisdiction. So, if it's criminal to kill in one territory (any part of the Earth, actually), and Thor kills (assuming it's not one of those circumstances which exempts one's liability, like for example if done in self defense or defense of others), then he is still bound to answer for his actions. If Thor kills on Asgard, a place not subject to mortal laws, it's theoretically possible he gets away with no legal consequence if his actions are legal in the Realm Eternal, even if considered criminal on Earth. The criminal law to apply is always the one in force where the crime was committed. If Thor commits a crime on Earth, he is bound by the laws of man, just like everyone else who lives or sojourns on Earth.
As for enforcement...that's a whole another issue, which has nothing to do with the legality or illegality of his actions. Technically Batman is guilty of vigilante activities, but James Gordon do not go after him because he feels Gotham needs him (and they do). But technically Batman breaks the law every night.