While those are the primary features of lenses, I need to explain why a 50mm f1.8 lens sells can sell for under $100 at B&H Photo while a 50mm f1.4 lens sells for $400, and an 50mm f1.2L goes for an eye-popping $1350. (You can see these for yourself at the following link: http://www.bhphotovideo.com/bnh/controller/home?O=search&A=search&Q=&sb=bs,upper(ds)&sq=asc&sortDrop=Brand:+A+to+Z&ac=&bsi=&bhs=t&shs=&ci=274&at=Brand_Canon&at=Lens+Type_Standard&basicSubmit=Submit.) As we discussed, engineering for those extra f-stop values likely accounts for some of the difference in cost, but not all of it. What explains the rest is build quality. Simply put: some lenses are engineered and built for consumers (read: occasional, light use, demand a low price), while others are engineered and built for professionals (heavy use under a variety of conditions, image quality at any cost).
So, for example, a professional lens will almost certainly be built out of metal and the finest optical glass available, while many consumer grade lenses incorporate a lot of plastic into the body and sometimes into the lens itself. Drop one of those 50mm f1.8 lenses and it's probably done. Gone. Finished. (Some pros call them "disposable" lenses for that reason and use them only as an emergency back up.) Drop that 50mm f1.2L on a rock, and, while you probably will have a heart attack, except for a few scratches, the lens itself may be just fine. So, choosing a lens is all about trade-offs. Generally--if you're serious about anything beyond scrapbook photos, you want the best lens you can afford, and you'll typically find the best values in fixed focal lengths (50mm 100mm etc.), but you have to decide what's most important to you. If in doubt, many professional stores will let you take a lens out and given it a trial run for, say, a weekend. For those here in Utah, I believe Pictureline in Salt Lake will let you do that.
One final note: photo retailers sell lenses made in the USA and also "gray market" lenses made elsewhere, which retail for less money. The trick to keep in mind here is that a gray market lens may not have a USA-backed warranty, meaning that if you have problems with the lens, you are out of luck. While a reputable dealer like B&H will make that clear, some less reputable dealers will not. So, I would recommend paying a little extra for a USA manufactured lens or making sure that a gray market lens has a warranty (for example, a "North America" warranty) that can be used in the U.S. If the seller doesn't specify what warranty applies, that should be a warning flag to you.