I read somewhere on this site itself that you should spend more on your lenses and less on your camera bodies.
Is it a myth or a fact that mostly it is the lenses which make your photographs not the camera bodies? If it is true, then on what basis?
It's a bit of both.
Everything that the camera has to work with comes to it through the lens. If the lens is horribly soft (that is, it gives low-contrast and not very sharp images) when you do everything right, then it doesn't make a lot of difference what camera it's attached to, you're not going to be able to get razor-sharp images with a lot of "pop". The same goes for any of the optical characteristics of a lens -- the camera can't give you a wider maximum aperture, lower distortion, etc.†
So there is a minimum level of optical quality below which you really don't want to fall when selecting lenses, and there really is no substitute for having the right class of lens for the job (whether that means having a wide maximum aperture or the right focal length).
And there are handling issues to consider as well -- many of the "kit" lenses and crop-sensor superzooms are optically very good (some are actually excellent), but they're almost impossible to focus manually because they have only a very narrow ring of knurled plastic way out on the far end of a wobbly set of focus tubes to work with. If you don't focus manually, you'd never notice, but a Zen master on Valium could easily find himself smashing what is otherwise an acceptable lens to smithereens (and kicking kittens) if manual focus was important to him. And some lenses that get the optics very right but saved money on the construction exhibit zoom or focus creep -- the glass in the lens is heavier than the mechanical bits can handle, so when you point the lens up or down, gravity does its thing and changes your settings.
All of that said, though, a lens can't fix all of the problems with a camera either. If you need to shoot, say, people in very low ambient light, it's a lot easier (though only slightly less expensive) to find a camera that will let you work at ISO 25,600 than it is to find a lens with an f/0.35 maximum aperture (and if you did find the lens, you'd have to decide which part of which eyelash on which person you wanted in focus, since everything else will be thoroughly blurred). And on the camera I use hand-held and in the field most of the time,‡ a 6MP Nikon D70, there isn't enough resolution on the sensor for me to see the difference between an excellent lens and one that's merely very good -- I could spend a fortune on the very best lenses, but until I change cameras I can't see the difference in my photographs. So yes, the camera body makes a much bigger difference in the digital era than it did in the film era. But it still can't make up for a horrible lens.
And let's be realistic, too -- the lens you can afford and actually use to take pictures will always be better than the brilliant but expensive pinnacle of the lensmaker's art that never gets closer to you than your Amazon wish list. When it comes right down to it, it's much better to have a $300 dollar Samyang on your camera, with all of its flaws and foibles, than an $1800 Nikkor locked away safely in your local photo boutique. The picture you can't take never comes out well.
As Nir said, the photographer, not the tools, is the biggest limiting factor.
† Both cameras and some outboard processing software can remove things like geometric distortion (barrel and pincushion), vignetting and lateral chromatic abberation after the fact by calculating what the image would have looked like without the problems, but that always involves losing some of the original data.
‡ I have Parkinson's disease, and I can't afford to buy a new top-of-the-range camera every time I drop one or involuntarily swing it into a wall. Meds can keep the tremors under control (and one learns to time things), but they don't do much for the clumsiness. At under $200 per, I don't worry about the D70s so much, and that's liberating. (I can't wait for the "ew, that's so-o-o old" used D7000s to hit the market at that price, though.) There's the whole CCD sync speed thing, too -- everything is X-sync, and all I have to consider is the flash duration being longer than my selected shutter speed. And since most of what I shoot is for small prints and the web, 6MP isn't much of a limitation. Now, if I could just get it to work in available darkness...
It's not the lens that makes the picture, nor is it the camera body, nor is it I'm afraid the photographer. It's a system of integrated parts that work together that produce an image, no one part can claim all of the credit.
The popular viewpoint that it's the photographer that matters not the gear, doesn't tell the whole story. I agree with the sentiment that with enough imagination you can make up for the shortcomings of your equipment, something which is often demonstrated hold up examples of amazing images shot with cameraphones. However no mention is made of how many conditions had to be just right for the image, how much skill (or luck) went into nailing the focus, likewise no mention is made of the type of photography attempted, it's much easier to use your imagination to create a funky portrait with a simple camera than it is to get a good wildlife shot with the same camera.
The same applies to the camera vs. lens debate. In the broadest possible terms, a good lens will make your images look better, but a good camera body will increase your chances of getting the image in the first place (with the right exposure/framing/focus). Both is preferable to get results consistently. You can of course overcome shortcomings in either but again it's heavily dependant on what you shoot. If you shoot in low light a good prime lens can really help, if you shoot sports you might appreciate a faster shooting speed and better AF.
Upgrading to a full frame body often means you can get better results (in terms of depth of field / sharpness) from cheaper prime lenses. For example if you're not limited by light shooting a 50 f/1.4 stopped down to f/2.2 (a stop and a bit) on full frame will give you the same framing and depth of field as shooting a 35 f/1.4 wide open on a crop but with more sharpness and contrast from a cheaper lens.
If you are birding then you really should have a telephoto lens. I can't say the word need because I once photographed a bird in flight with an ultrawide 10mm lens but it was a few inches from my face. Again you can do without the gear but in this field you wont get the results nearly as often.
It's the photographer that makes the picture, not the camera, lens or lighting equipment.
The reason for the advice to invest in lenses is that for most cases the cheap DSLR bodies are good enough and you simply won't use the features of the more advanced bodies - while you will see the difference with the better lens.
My advice is to find the factor that limits you and spend the money there - in my cases (and I believe for most amateur photographers) a good flash and a set of radio triggers makes a much bigger difference than the body or the lens.
As one of the perpetrators of that myth, I feel that most people are missing the point.
It is true that everything is important - the system as Matt said - but if you have to give more importance to one piece of equipment, it is the lens.
If you look at historical photos, you will see plenty of evocative images made from cameras and lenses which do not even compare to the cheapest kit you can find today. What makes them powerful is what is in them, and that is controlled much more by the lens.
There are of course plenty of reasons to get a better camera, including the ability to shoot in lower light, faster, in freezing temperatures, under the rain, etc. A new lens also gives new abilities like a different prespective, angle of view, depth-of-field, reach, etc. Of all those, the abilities given by the lens will have a far greater impact and your photography.
Once you get the right framing, subject and perspective, then you should worry about what your camera can do.
In the days of film, the camera was basically a light-tight box. The film and the lens determined quality. So that statement was true to a degree.
In the digital world, the sensor may make as much of a difference to image quality as the lens, especially at higher ISOs. So the answer is...it depends. If you have enough light to shoot at ISO with a fast enough shutter speed, the lens is going to be the most limiting factor. If you're shooting at higher ISOs, the sensor matters.
In any event, if you can't get a fast enough shutter speed, a good tripod might help with absolute resolving power more than either the lens or sensor.
Much of the Time, Lens Quality Beats Camera Quality!
By ignoring the lens quality when considering new kit, you may as well forget the quality of camera too. You see, you may buy the latest all-singing, all-dancing camera, but if you put a cheap lens on the front, you lose all the benefits that the camera has.
How can I check the lens quality when I buy one?
If you use a digital SLR camera, take it with you when you next go into a camera shop. If you don't use digital, ask the shop assistant if you can borrow one to test the lens.
First of all "feel" the lens. Is it sturdy? Does it feel like quality in your hands? Do the focus ring and/or zoom ring operate smoothly? Is it heavy-ish? (means better quality glass), what is the maximum aperture? f.8? Too small! You will hardly be able to use it in normal situations. f3.5 is a good start.
Put it on the camera and test the autofocus. Is it reasonably quick and accurate? Is it very noisy? (bad)! Does it spend time "searching" for a focus point or does it find the spot quickly? Can you switch it to manual focus? Again, how does it "feel"?
Now take a couple of photos. One of a scene, using a small aperture like f.11, maybe of the street. Use the cameras replay mode and zoom in to check the focus, paying attention to the edges. Are they pretty sharp? Is the depth of field ok, with distant objects being relatively clear? Is there any fringing (purple halos) around anything?
Now, take one inside the shop using the widest aperture of f.2.8 or f.4 (maybe f5.6) for a really shallow depth of field (i.e. just what you focus on will be sharp!). Be careful to focus on something in particular and hold the camera steady, take the shot. Again, replay the photograph and check that what you focussed on is actually in focus!
Then you'll learn if the lens or the camera.
I think the answer boils down to one simple point related to physics and another one related to product evolution:
I'd start with the cheapest entry-level body that fits my hands, and spend all I can afford on the lens. Then later, perhaps after building a collection of various quality lenses, upgrade the body to a newer and/or bigger model.
The idea comes from pre-micoprocessor days when camera bodies were all mechanical and lens design wasn't computerized. Camera bodies were just light-tight boxes (many didn't even have shutters) and the quality of the lens was very dependent on human craftsmanship (and perhaps some luck). Given two competent 35mm mechanical cameras made by different companies with the same kind of film, the difference between the two cameras would the lenses.
During this era there was a photographer (or cinematographer, I couldn't find the quote) who said something like -- if the lens I want mounts on a pumpkin, I'd use a pumpkin as a camera.
These days the bodies are much more important in terms of differentiating camera equipment -- as the quality of the sensor, image processor, etc. do have an important effect on quality.
But like I always say -- I've taken crapy pictures with very good cameras. The really important equipment is yourself.
The advice to spend more on lenses than on the body reflects the ongoing investment, if a body wears out or breaks then the lenses can be used with a new body. Also different lenses mean different photographc options.
That said, it is a triumvirate of photographer, camera body and lens. If any of these is not up to the job then the resulting pictures will not be as good as they could be.
There is also the adage that the best camera is the one you have with you, which tends to argue in favour of smaller (and perhaps less valuable).
In brief, it's complicated.
My experience is that photographer skills is the first important factor. Lens is very important when it comes to the type of photo you are going to take. Most of entry level lenses can do the job, but when you want to capture a ,for example, long-focus photo your lens is very decisive on the results you get.