Sort your colours.
Separate darks from lights and delicate fabrics from more durable garments. When in doubt use cold water, especially for dark clothes to avoid shrinking, fading, and bleeding of dyes. Using cold water saves energy and resources, too. For heavily soiled whites or light colors, however, warm or hot water may be the best bet.