Here’s what we know – the right of pits and gallows is the right to imprison and execute, respectively. How the lords execute that right is unknown.
We know two other things of importance: first, we know that liege lords can act as courts of appeal, and the king as the supreme court, because we see that in Eddard XI. Second, we know from the WOIAF that Jaehaerys I established a single royal law code, and if it exists, it must be used somehow.
So here’s my best guess: maesters in the Citadel are educated in the law from Jaehaerys’ code and the various precedents of interpretation. They advise the lord as to what the law is (and depending on the lord, they might be the judge in all but name) but don’t have the power to make the lord follow it. (Although, as the keepers of the ravens, they do have the power to potentially inform on their lord…) However, a decision that violates the code might well be reversed by that lord’s liege lord, because it’s technically treason and would (if found out about) bring the wrath of the Iron Throne down upon the lord might their liege who failed to uphold the king’s laws.
On the other hand, that all depends on whether anyone with influence gets the word out. If a lord decides to hang a common peasant who the law says shouldn’t be hung, the chances of a successful appeal or reproach to the liege lord are extremely slim, unless some other knight or lord makes it an issue. (For example, if a lord hangs another knight or lord’s peasant (like Dake from Sworn Sword), or the peasant in question happens to be a servant of someone important who takes offense) A merchant or very rich peasant might have enough money to pay a maester to draft a formal complaint or to bribe the liege lord into hearing their case, so that’s riskier. A knight or lord, and now you may very well be talking about either an appeal or a rebellion.