The phrase is never about literally cracking nuts and always refers to an excessive solution to a simple problem. Buying the latest smartphone just for calls is using a sledgehammer to crack a nut.
Pro Tip 2/3
Not Physical Force
The 'force' often refers to excessive measures, not just physical strength, like spending too much money or effort. Setting up a committee to change a lightbulb would be using a sledgehammer to crack a nut.
Pro Tip 3/3
Often Negative
The phrase usually implies a criticism or disapproval of the excessive approach. They brought a whole team to fix the printer - talk about using a sledgehammer to crack a nut!