The phrase often suggests the speaker is asserting control or authority in a situation. The captain decided to lay down the law before the ship set sail.
Pro Tip 2/3
Not Always Negative
Though it may sound strict, it can also mean setting clear, needed guidelines. The teacher laid down the law about plagiarism in her class.
Pro Tip 3/3
Not Literal Law
The 'law' refers to rules or standards, not actual legal laws. The camp counselor had to lay down the law about lights out times.