Moral luck is the philosophical description of a situation in which a moral agent (the ability to choose between right and wrong) is assigned to either the praise or the blame for the results of a situation, even when it is clear that moral agency was not wholly responsible for the outcome either way.
A simple example is a scenario with two drivers. Both choose to run a red light. One accidentally T-bones another car, the other gets through the intersection cleanly. Both committed the same traffic offense but are held to different standards legally. The one who got through the intersection cleanly gained their escape through "moral luck."