Good luck is the most common expression we say to someone when we hope that they will be successful.
Good luck with your driving test.
Break a leg is used in informal English when we wish someone good luck, especially before a performance. We usually say "Break a leg" to actors and musicians before they go on stage to perform, but it can be used as for other situations too.
Tonight's your first time acting in front of an audience isn't it? Well, break a leg!
The history of this strange expression comes from the superstition of actors. They believed it was bad luck to wish good luck to an actor before going on stage. They thought saying good luck would result in something bad happening. Following this logic, if you wish something bad on someone, such as breaking a leg, they would actually have good luck!