I've been top-roping for several months. About a month ago I found out how much fun bouldering is. I've been getting quite a few scrapes on the knees working certain routes, or from falling. I'm climbing at an indoor gym wearing shorts. Some people climb in long pants, but many don't. It's not a big deal, but I wonder if this is mainly a technique issue which will go away over time, or if there's some knee protection available that wouldn't reduce flexibility.
It doesn't really go away with time. At least not for me - when I'm on a hard gym route I tend to ignore any holds that are "off" for that route, and every now and then I'll hit one with an elbow or knee. Also outside, while you want to emphasize using your feet, ever now and then you'll find yourself needing to place a knee on a hold. Working on technique and flexibility will make these issues better, but there's no reason to build up a bunch of scar tissue on your legs while that's happening.
There are pants made specifically for bordering and climbing. They look like heavy denim capri pants. You may want to look into some. Anything made of a heavy denim with gusseted crotch and articulate knees should protect the skin on your knees while still giving you range of movement. Prana, Patagonia, and Arc'teryx all make pants like this.
Generally, a more controlled and precise technique should reduce undesired knee scraping and banging... But I find that the ability to achieve this precision is, at least to some degree, dependent on your strength reserves, and decreases during a session. Often, several hours into a climbing session I find myself making bigger and less precise moves, and often these end up with scraping or banging of a limb on the wall or some hold. That's usually my cue to pack it up and call it a day.
As far as knee protection goes, any soft, full-sleeve, fabric style knee padding should work well for most impacts you would normally experience while climbing. But only you know how hard you're hitting the wall and the holds, so really, the best advice I can give you is to go and try out a bunch in the store, and see how much protection they provide. I think the soft (and therefore flexible) pads would be the best place to start. Perhaps volleyball style knee pads would work well?
Disclaimer: I don't climb.
Images shamelessly stolen from first search results. I do not endorse any brand.