A few things on this one...
Static stretching before a workout has been shown in studies (several, if I recall correctly) to decrease force production. Dynamic stretching (not ballistic, there is a difference) is the best way to stretch before a workout after you have warmed up, as curgeo stated.
Curgeo also mentioned a nice trick for gaining a bit of strength on your sets. Stretch the antagonistic muscle (opposite the muscle that you are working) before your set. This trick capitalizes on what has been mentioned, already... a static stretch decreases force production. When you decrease force production on an antagonistic muscle, it does not inhibit your movement (through nerve reflexes out of our control). As a matter of fact, this is a trick that is heavily used in the vertical jump test (NFL combine, etc.): aggressively stretch your hip flexors immediately before a vertical jump test, and you will see instantaneous improvement.
After a workout it by far the best time for stretching. Solid static stretches or PNF stretching are best at this time, and can truly make an appreciable difference in flexibility. Some would suggest, and I tend to agree from experience, that stretching after the workout can also facilitate recovery.