When I didn't stretch, I ended up with dead and swollen legs. And, more often than not, would start getting injuries. As I have gotten older, it has become even more important for me to stretch for recovery. Stretching for recovery - I can't tell you how exciting that revelation was for me. When you climb off your bike, be certain to make stretching a part of your post-ride routine.
Warm muscles are more resistant to injury.
Thus, stretching after your workout is a natural. If you feel the need to stretch before a ride, it would actually be more effective and safer if you rode easy for 5-10 minutes, stopped at a park and then stretched. Personally, I don't bother unless I find I'm still tight after 10-15 minutes. Instead, I just ease into the ride. Warming up means warming up and that means riding.