A new chapter is taking shape for a once-taboo slice of the venture capital ecosystem.

About 200 companies are in Y Combinator’s current cohort of startups, but three of them are “plant-touching” cannabis businesses whose presence in the program signals a shift in Silicon Valley.

Until now, major venture-capital firms eschewed companies in...