Turbulences are mostly caused by wind shear and pressure differences
Pilots don't really know when they are going to encounter turbulences. But they can have a good estimation about it from several inputs:
1. Before any flight a pilot will call the FAA briefing center and will get a detailed weather forecast along his route.
a. Within that briefing you get all the estimated turbulences with an up-to-date other pilot reports.
b. You will also be notify on the altitude, direction, and location of the jet stream which is a major cause of turbulences
c. A bad weather activity is, of course, also a major cause- cumulonimbus (active storm clouds), thunder storms, hurricanes etc will not come without turbulences in there close environment
2. By looking out side, sometimes you can spot indications of wind shear such as- differences in the type of clouds.
3. many airplanes carry a weather radar to track bad weather activity
To sum it up- Pilot cannot tell the exact location and the severity of the turbulences along his route. But he can build a good forecast/estimated picture of the air activity of it. This is exactly the reason why they ask you to fasten your seatbelt whenever you are seated even if the fasten seatbelt sign is turned off- there are always surprises along the way.
BTW- the FAA brief center number is: