It is hugely important to go to the range if you are a high handicapper. 15+ maybe? You need repetition. You need to be able to instantly hit the same shot again whether you hit it good and want to reinforce or hit it bad and want to make the correction. How many times on the course have you hit a shot OB, dropped and hit again and striped it? You feel what you did and can instantly correct it. You also need to be able to experiment. Strengthen the grip, weaken the grip, swing more inside or whatever. See and feel what works and what the effects are.
Once you get into the low teens, I think you can start substituting range sessions with practice 9 hole outings. This is because the one thing you CAN'T practice at the range is "playing golf". If you can stripe it down the range every time but can't navigate a hole or put 4-5 shots together for a par or bogey then the range becomes less valuable. Also my home course does not have any type of Short Game area and working on spinning wedge shots with range balls onto a rock hard range is useless. These shots can only be dialed in by hitting a real golf ball to a real green surface.
As an 8 right now, I go about twice a week to the course, spend 10-20 minutes on the range getting loose and working on what I consider benchmark shots such as an 80ish yard wedge, full wedge, an 8 or 9, a 4,5 or 6, 3W or 5W and then Driver. Then I walk over and play 9 holes. Here I play my first ball all the way through so I can at least have a score to think about and evaluate my progress. If I am unhappy with a particular shot and want to hit it again or want to drop a ball at a certain distance I will do that but then pick it up and continue to play my first. Not exactly a legal round but I am not posting them and its just practice.
Finally if I ever feel that something is off, something that I don't want to work out on the course (I don't want to chase down 20 golf balls) I will make a special trip to the range and work it out. In the end, just make sure your expectations are correct. If you don't practice but like to play then don't get mad when you don't play well. Just enjoy being out there. Grab a beer, flirt with the cart girl and laugh when you hit a tree and it almost hits you in the head. After all, if you are on the golf course, life is pretty good.