Once it has been determined that you have a vision problem
For many people, the natural look and performance of the contact lens makes it the logical choice over glasses. Contact lenses are virtually undetectable if you want them to be, and they sit directly on your cornea, so they won't obstruct your view or cause a glare when you're trying to see. Sometimes, the fact that there is distance between the lens of your glasses and your eye creates a distortion in your vision. Glasses also have a tendency to fog up from time to time as humidity and temperature change, while a contact lens will not. Some other points in favour of choosing contacts over eyeglasses are that wearing contact lenses allows other people to see your eyes without any obstruction, contacts won't impair your vision when it rains or snows and you can wear regular sunglasses with contacts without altering your prescription or having to purchase prescription shades.
On the other side of the coin, some people will prefer to wear glasses over contacts. Long time glasses wearers will often stick with their glasses as a matter of habit, while others may not be too fond of the process of putting in contact lenses everyday. Throwing on a pair of glasses is much more convenient than the process of inserting and removing contacts and keeping them in the proper solution when they aren't being used. Another reason some people will choose eyeglasses over contact lenses is the fact that wearing contacts leaves you vulnerable to eye infection. The care and cleaning of contact lenses is very important to prevent infection, and when compared to the ease of wearing glasses, some people just can't be bothered. You can get disposable contacts that may be discarded at the end of each day without having to soak them in solution, but the risk of infection still exists.
That's not to say you don't have to care for your glasses too. Careless handling may scratch your lenses, and they often need to be wiped off several times per day just so you can see clearly. Many people will purchase both contacts and glasses, and wear one for certain occasions and one for others. Some people like to shed their glasses for a more natural look when going out for dinner or a show, while others like to match the frames of their glasses to their wardrobe as a fashion accessory.
The wisest thing to do in the glasses and contacts debate is to listen to your eye doctor and choose whichever one you feel complements your lifestyle the most.