How flexible do you need to be for climbing?
There is no real rule as to how flexible you need to be for climbing, but, being flexible can really help a lot in climbing and in solving the problems. It gives you more tools to use on the wall to finish the routes.
Having basic flexibility and a full range of motion is a good starting point, and building on that can get you a long way in climbing.
If you are not flexible, though, don't think that you won't be able to climb hard routes. I have known many people who cannot touch their toes even with slightly bent knees, and they can climb v7/v8.
On the other hand, I know some climbers who are very flexible and that are relatively beginners, they normally climb v5/v6, but sometimes they are able to top some v7s due to their flexibility. It just gives them that additional advantage.
Being flexible can also help prevent injuries. Some routes require a low level of flexibility, and others may require quite a high level of flexibility. Working on routes that require a level of flexibility that you do not have could result in injury.
Being flexible in general also just helps prevents injuries.