Studying to become a lawyer is allowed as far as you support the victims and the justice. Those lawyers who aim only to gain money and support the wrongdoers through legal tricks are doing wrong and their income from the wrong is unlawful.
It depends on you how you want to be. Obviously, the person who believes in Allah and Day of Judgment will never support the wrong, because he will face the miserable consequences.
This applies to other professions like medicine, education, business, etc which can be used in right way by good people, and wrong way by wrong people.
We encourage good persons to study law to support the innocent people.