Definitely! They are basically designed for this purpose.
By locking the front or rear differential, these lockers help you to make your way out of slippery conditions. To be more specific, the rear axle wheels are locked so that they spin at the same speed. This ensures that greater traction is produced, which then helps the vehicle to get out of the mud or snow.