When you swirl your glass of wine this helps to release the aroma so you can identify the character of the wine. It will also leave behind a thin film of liquid on the outside of the glass, these are known as legs, tears, or arches.
Very simply the alcohol in the thin layer of wine on the side of the glass evaporates leaving the water, sugar, tannins, and some of the alcohol behind – these form on the side of the glass as droplets, and voila!
Wines with higher alcohol and sugar levels will leave more legs for obvious reasons. Sugar will give you slower tears as the sugar will stick to the side of the glass.
Other factors such as the shape of the glass, the temperature of the wine and the environment, the humidity will all have an effect on how many tears are formed. Temperature and humidity have the greatest effect as these directly influence evaporation.
What information do they give about the quality of your wine?
Nothing, Nada, Zip, Diddly Squat! – The only information they are giving you is that there is alcohol or sugar in your wine.
Honestly – try it with juice, cordial, or soda and they will all leave legs behind to a varying degree.
This is known in science as the Gibbs-Marangoni oddly enough named after the people who studied it.
If you have an unscratchable urge to find out more than the good (but very confusing) people of Comsol can help you out.
There are also many google articles about this phenomenon including the one below from NASA which at least gives you the information in space rather than just the information.