By general terms, we can say in general that the below P/E range can be attributed as good buying values in small-cap, mid-cap and large-cap stocks,

Penny-Cap Stocks - P/E of less than 7
Small-Cap Stocks - P/E of less than 10
Mid-Cap Stocks - P/E of less than 15
Large-Cap Stocks - P/E of less than 20

There are exceptions of-course, where stocks command little higher P/E for being market leaders in their segment like Titan Industries (P/E of 37), CRISIL (P/E of 27), Asian Paints (P/E of 38) and so on.

Also, please note that, lower P/E does not mean a stock is good. Its even more dangerous to assume so. The stock first needs to be fundamentally good. Then comes P/E.

But for these few exceptions, buying stocks of P/E higher than 30 is expensive, risky and bad investments.