"Time Outs" as a Disciplinary Measure

How effective are “time outs”? Our son is entering toddlerhood and I’m not sure what type of discipline is best for different behaviors. My friends all seem to rely on “time outs” regardless of the nature of their kids’ behavior. I’m not sure this is always the best method. When are “time outs” an appropriate means of discipline? When are they not? How can I tell the difference?