definitely do not ride a bike with a stretched hamstring. The rotary motion shortens the muscle making it even tighter. you should aim to stretch regularly, but gently. Remember RICE Rest, Ice, Compression, Elevation. Good luck, get well soon. hope this helps