My underage friend was arrested for selling weed and he is an illegal immigrant.
Selling weed is a criminal offense and therefore violates the immigration laws. Your friend will most likely be deported. The best way to keep illegal immigrants from being deported is to have the illegal immigrant stop breaking the criminal laws.
The answer provided here is general in nature and does not take into account other factors that may need to be reviewed for a more precise answer. You should consult with an immigration attorney before taking any action. The answer here is not intended to create an attorney-client relationship.
I agree with my colleague. Selling drugs is a crime involving moral turpitude. It is very possible that there will be an immigration hold after his sentencing. Since he is undocumented there's no relief to which he is entitled.
It could be considered drug trafficking and a bar to obtaining LPR status in the future. That said, there is a case pending in the U.S. Supreme Court that may impact the trafficking definition in regards to social sharing. Your friend needs to get a lawyer now who understands the interplay between criminal and immigration matters.