Question: When looking to sew a piece of fabric, what factors are looked at to determine the correct stitch length?

Answer: 
[Stitching lengths:](http://www.the-sewing-partner.com/sewing-stitch-adjustments.html)

> 
> 2mm is the short stitch length that should be used for lightweight
>  fabrics, for satin stitching, and decorative stitching. 
> 
> 
> 2.5 - 3mm is the average stitch length range that should be used for medium weight fabrics. 
> 
> 
> 4 - 5mm is the long stitch length range that should be used for
>  basting and topstitching.
> 
> 
> 

[Stitches for Dummies puts it this way:](http://www.dummies.com/how-to/content/making-machine-stitches-work-for-you.html)

> 
> * The average stitch length for mid-weight fabrics is 2.5 to 3 mm/10 to 12 spi.
> * The average stitch length for fine fabrics is 2 mm/13 to 20 spi.
> * For heavier fabrics, basting, or topstitching, use 4 to 5 mm/5 to 6 spi.
> 
> 
> 

Personally, I baste by hand and use a shorter length stitch for strength when necessary. This [video](http://www.howcast.com/videos/454064-how-to-select-stitch-length-sewing-lessons/) explains where I am coming from!
In addition to the good answers by other responders, I want to add that with a short stitch, you also increase the possibility of puckering, sometimes a longer stitch gives a much smoother appearance. 

When the stitch length is very short, yes, you can achieve some seam strength, but if the fabric is light-weight and/or has some stretch and the seam has none (short stitch length used), the fabric can tear away from the seam, or the thread in the seam can even break if pulled hard enough. 

There are so many variables with the fabric you are using, its weight, density, stretchiness, etc., that it's always good practice to do a quick test on a small piece of your fabric (including linings and interfacings if used).

Most newer machines have very good User's Guides with a lot of useful information, including tables showing best stitch lengths for different types of fabrics, best needle size, what foot to use to achieve a certain stitch, etc.