Meaning - Wish good luck (especially) to actors before they go on to stage
There are different stories behind this phrase. But one interesting story goes with John Wilkes Booth who assassinated Abraham Lincoln on 14th April, 1865. After assassination, Booth tried to escape and broke his leg, but it was his luck that he escaped because of his broken leg. Still his luck ran out and got killed twelve days after the incident. Basically the assassination incident happened in a theatre and when Booth assassinated Lincoln, he tried to jump on stage and that’s how he broke his leg. So now the phrase is used to wish actors good luck even though it’s literal meaning sounds bad omen.
Image Source: Wikipedia.org