Gem sockets, and item enhancements such as enchants, leg armor, spellthread, and shoulder/helm glyphs provide a way to enhance your character without having to upgrade your gear. At the level cap, having your gear fully gemmed and enchanted can provide that last bit of DPS/healing/damage mitigation that you need to complete a heroic dungeon or raid. Once you reach the level cap and start running heroic dungeons, the question is not "should I enchant or gem this item" but "how much should I spend on gems/enchants for this item?"
Even Cheap Gems/Enchants Are Win
Obtaining gems and enchants for your gear does not have to be expensive. Especially if you are not in a hardcore raiding guild, even uncommon gems and cheaper enchants will do the job just fine. The rare gems will often provide a smaller stat boost compared to the amount of gold you will have to fork over.
Save Gold By Hiring a Crafter
Hiring someone to cut gems or enchant your gear can save you a lot of gold. If you obtain the materials needed to enhance your gear, you'll save plenty of gold even after giving your crafter a generous tip! Always compare the price of the materials needed to craft an item versus buying the item itself when you're shopping on the auction house.
Consider How Long You'll Be Keeping The Item
If you know you'll be replacing a leg item soon, and you don't have a ton of gold, it wouldn't make a lot of sense to drop 1000g on spellthread and gems for it. In this situation you might consider buying a couple of cheap uncommon quality gems and cheaper, lower level spellthread if available. If you get an item by trading in valor points, it would make sense to get better enchants since you will be keeping that item for awhile.
You Don't Have To Spend a Fortune
If you can find someone in your guild to craft inexpensive item enhancements for you – enchants, gems, spellthread, weapon chains, belt buckles, shield spikes, and more – the cost of materials can be easily recovered by running a couple of random dungeons at the level cap. The extra boost you'll get from fully enhancing your gear will be well worth the gold and time you invest into making your character uber!