If you're just starting out and asking basic gear questions, you should probably be most concerned with practice time and gaining basic technique and understanding of exposure and post-processing. :D The problem now may be your gear, but your biggest problem is lack of enough experience/knowledge to determine if your problem is the gear (and what gear, precisely) or if the problem is technique. (See: Why are my pictures not crisp?)
However, assuming you have determined that it's definitely a gear limitation rather than a lack of technique that's holding you back, and you've narrowed the gear down to lens and body (vs. lighting gear, support gear, software, or computer hardware), then you need to ask yourself two questions.
Which gear solves my issue?
What is your issue? And which piece of gear will solve it? Sensors can have better high ISO performance, higher resolution, larger dynamic ranges, and smoother tonalities. Bodies can have more sophisticated autofocus systems, built-in processing features, and hardware UI controls. If your problem involves one of these types of features, then the body might be the better buy.
Lenses can solve issues of chromatic aberration, maximum aperture "speed", focal length requirements, and may be linked to autofocus speed performance. If your problem involves one of these types of feautures, then the glass might be the better buy.
If, however, your problem is something like, "I want to shoot birds in flight, but my lens is too short and my autofocus too slow", then you might 'need' to upgrade both the body AND the lens, as well as practice better field craft, and honing your own reflexes. Gear is not always a magic bullet that solves a problem all on its own, but is part of the solution in combination with other factors.
How much bang for the buck do I want?
Or, in other words, how much depreciation matter to you? dSLR bodies are digital electronics. Like cellphones and computers they depreciate quickly, and are often refreshed as models. While some rare folks can hang onto a dSLR body for a decade, most folks seem to regularly "upgrade" bodies as a matter of course to keep up with current technology/feature-greed/sensor advances. Just like cellphones and computers, how often do you move to a newer model? You may want to keep this in mind before "upgrading" a body: there will always be a newer, shinier one in the making. New products in camera land often get announced every six months (spring (Feb/Mar) and fall (Sep/Oct) being the most common times). Can your current camera last you another release cycle?
Lenses, on the other hand, are not regularly refreshed. While they have digital electronics in them, their main technology is optical, and advances in optics design don't move at nearly the rate of Moore's Law. Some lenses can last in a lineup for decades before being "refreshed", and unlike camera bodies, higher-end lenses will often hold on to as much as 90% of their value on the used market. In other words, any money you spend on any other part of the system is liable to stay with you longer than the money you spend on a digital camera body.