Is it worth having an SM58 for live work? Yes--it's not necessarily the best mic for purpose but it's certainly the most common.
Is it worth having an SM58 for recording? That's less certain because it depends a lot on the range of stuff you want to record and how many other mics you may have.
The SM58 is designed for close up miking of vocals. As such, the frequency response rolls off at the low end to minimise proximity effect and has a slightly harsh presence peak as you get to the top end to give vocal clarity. It's also quite lacking in sensitivity when you get more than a couple of inches away from the mic. On quieter stuff miked from farther away, you'll be struggling to get enough gain and have a slightly skewed frequency response.
Even for vocals, only a few acts actually use an SM58 in the studio. Most studio vocals you hear are recorded on a large diaphragm condenser mic even if they use an SM58 in their live act. And, even live, quite a few sound engineers only use SM58s because they're tough as nails and what everyone is used to so there aren't many arguments from the singers. In sound terms there are quite a few mics by companies like Audix and Sennheiser that can blow the SM58 away when judged subjectively. FYI, the SM58 is a 45 year old design that was radical at the time but it hasn't kept up with more modern mic designs.
So, the answer will come down to what you want to use it for and what your expectations are. Everyone should have some 58s in their mic box but, at least for me, it wouldn't be the first mic I bought for a wide range of uses.
Finally, if you DO decide to go with the SM58, beware any deals that seem too good to be true. The SM58 is likely the most counterfeited mic in the world--and any price significantly less than the norm is likely a Chinese knock off.