Rule:
Use the he/him method to decide which word is correct.
he = who
him = whom
Examples:
Who/Whom wrote the letter?
He wrote the letter. Therefore, who is correct.
For who/whom should I vote?
Should I vote for him? Therefore, whom is correct.
We all know who/whom pulled that prank.
This sentence contains two clauses: We all know and who/whom pulled that prank. We are interested in the second clause because it contains the who/whom. He pulled that prank. Therefore, who is correct.