The purpose of cocktail glasses is just to look pretentious, right? It'd be just as well to drink things out of a pint glass, or a mug, or a shoe, wouldn't it? It's still the same drink after all. Mine's a Cheeky V.
No.
These days we are inundated with the accumulated specialist drinkware of centuries, and so with all the different shapes, sizes and styles available it is not difficult to mistake this variety as something that exists largely for aesthetic reasons. Obviously to an extent this is true, as how a drink looks is the first stage of its making an impression on the drinker, and so the importance of the visual aspect is not to be discounted. However, more often than not a glass's primary function is practical in nature, with two main aims: firstly, maintaining the temperature of a drink, and secondly to accentuate its aromatic qualities.
Let's go through the most important types:
Cocktail glass AKA Martini glass
The glass most synonymous with what we might term 'serious' cocktails (i.e. those not served in a jug with four measures of vodka and 'cosmopolitan mix' out of a carton), this type originated around the beginning of the 20th century. Drinks in these are almost always served chilled without any ice in the glass itself. The stem allows the drinker to hold the glass without warming the drink with their hand, allowing it to stay cool for longer. The wide mouth and conical shape means that it's difficult to drink from it quickly (without considerable care and/or practice), and so it encourages a manner of drinking that is more conducive to enjoying 'short' drinks like a Martini, Manhattan or Cosmopolitan. The shallow bowl also brings the drink closer to the nose of the drinker, meaning that any citrus oils or other fragrant elements will be easy to detect and will add considerably to the drinking experience.
Old Fashioned glass AKA lowball glass, rocks glass
As the name suggests, this is the glass you'd be served an Old Fashioned cocktail in. Drinks served in these are often served over ice, or 'on the rocks', hence the 'rocks glass' name. However, some drinks like the Gin Fizz or the Sazerac are traditionally served in an Old Fashioned glass without ice. The thick base allows fruit and other ingredients to be muddled with impunity.
Collins glass
So named because this is the glass you would be served a Tom Collins in. These glasses are suitable for 'long drinks', more dilute than you would typically encounter served in an Old Fashioned glass and served with a lot of ice, and probably a straw.
Highball glass
Like an Old Fashioned glass but taller and thinner, or like a Collins glass but shorter and wider, depending on your perspective! Functionally this is really used in just the same way as a Collins glass, for drinks where the volume of alcohol is balanced with a fairly substantial amount of non-alcoholic ingredients.
Shot glass
This is the sort of glass you'd normally encounter layered drinks in such as the B-52. Being so small allows decent-sized layers to be created with ingredients that you wouldn't normally want to drink straight in any quantity such as blue curaçao or grenadine. In any case, for layering to work at least some of the ingredients must be fairly sugary in order to create adequate separation due to the variation in specific gravity.
This is the obvious choice for champagne cocktails or any made using sparkling wine, for the same reasons you would use them to drink the wine on its own: the narrow mouth means less exposure to the air and longer-lasting bubbles, as well as focusing the effervescent aroma of the drink.
There are other types of glassware that you might encounter...champagne coupes, for example, are often used for Margaritas, as they allow more room for ice should you wish to serve them that way, but equally a regular cocktail glass will do fine. Similarly, while an Irish Coffee will look nicer in a heatproof glass, there's no taste-related reason why you can't make an equally good one in a mug if that's all you have available. The above types have a closer relationship with the drinking experience, and so if you're serious about cocktails, it's probably worth getting hold of a couple of all of these types.