Gardening is like any other activity or exercise and requires warming up and easing into it, so start with the smaller jobs and build up to the heavier ones. You don't have to accomplish everything in one day, and overdoing it can lead to those niggles becoming full blown pains. Consider manageable chunks of time (approx. 20-30 minutes) and vary the jobs you're doing to give each body part a break.
When pruning, try to stand as close to the plant as possible and stand head on, as ligaments and muscles can get strained if you are reaching and twisting.
When potting and planting, use a planting bench/table or kneel on the ground to avoid bending and stressing your low back.
Digging is one of your more strenuous jobs, but also a great workout! Again, use the spade straight on to avoid twisting and bending, and try alternating the foot that drives the spade into the ground. Digging and pulling out roots/bushes etc. cause the most injuries, so loosen up the ground first and don’t dig when it is very dry & use leverage to assist.
Always be patient with moving heavy items around the garden and enlist help to shift those pots & bags of compost! When lifting, always use the proper form: lift with bent knees and keep your back straight -- do not stoop! Make multiple trips instead of risking a back injury from lifting too much at once.
Most importantly, if you feel sharp pains or the ache gets too much, take a break and come back to it another day. After all, your garden should be a source of joy and contentment, not pain. A warm soak in the bath can help the aching muscles and ibuprofen tablets help with an anti-inflammatory effect. It's also important to cool down after your day's work, so go for a short walk and do some stretches to help your muscle tension and flexibility.
If your pain doesn't settle within a few days, see your local osteopath for treatment and advice. Perhaps consider a pre-season back check-up before the gardening season comes into full swing...it could save you weeks of pain!!