last year, somebody posted an interesting article doing statistical analysis around the age of NBA draftees, and how there was a much higher correlation to "stardom" [based upon some criteria they set about what that meant] and being younger when you're drafted.
So, age isn't the end all / be all by any means. You can definitely get solid contributors and even starters who are older players when they get drafted. But the likelihood that said older players ever achieve "stardom" is statistically much lower than it is for younger players. And please note, the study indicated that just taking younger players is no guarantee that they'd achieve "stardom" either, just that they had a higher chance.
Hence, why the NBA is obsessed with the age of the player when they draft them. It is just one of many data points they consider.