What is the origin of the expression "legislate from the bench"?
As requested, a simple explanation. Judges sit not so much on a literal bench as at one; behind a long, heavy table, often raised from the rest of the court (compare a workbench; a carpenter or welder would be surprised to be given padded seating). The reason is partly historical, partly so that a panel of several judges can sit close enough to consult if necessary, and partly practical; litigants (including lawyers) are frequently disgruntled, but this way they cannot push the table over or physically attack the judge, which would involve a lengthy prison sentence.
The Bench is thus the distinguishing mark of judges, as The Bar is for advocates, arising from the former practice of lawyers standing within a bar in the courtroom, while laymen stood outside. A law student who passed his exams was called to the bar, and became a barrister.
The bench in this context means:-
the place where a judge sits in a court of law
So legislating from the bench means legislating from the judge's seat, which is to say, making rulings that (in the opinion of the speaker) are tantamount to modifying laws passed by the legislature, or creating new ones.