In short: use a car or a tour. No source gives a drive time from the beaches to the cave, so check it on a live map and leave room for traffic.
What we know about the roads
Wikivoyage describes the A24 as the preferred route from Thessaloniki to Kassandra and Sithonia, busy on summer weekends. It also says there are no direct bus routes between the two peninsulas and that Thessaloniki to Toroni takes 3 hours by bus against 1.5 to 2 hours by car. Wikipedia says Halkidiki has no railways. Nothing in these sources names the road from the beaches to Petralona.
Plan it as a half-day
Kassandra and Sithonia are the beach peninsulas; Petralona is a village near Triglia (see the map). Fit the cave around its hours (see tickets and hours) and let the museum, which uses the same hours, share the visit. In winter, 15:30 is a hard stop.
Hire a car
A rental car is the simplest way to combine beach and cave on your own schedule.
Or book a guided trip
GetYourGuide lists a day trip that goes from Petralona Cave to Afytos and Kassandra, and Sithonia day trips from Thessaloniki.
More: day trips in Halkidiki, from Thessaloniki.
Frequently asked questions
How long is the drive from Afytos to Petralona Cave?
We found no sourced time. A GetYourGuide day trip lists Petralona Cave, Afytos and Kassandra together, so combining them in one day is possible, but check the exact time on a map.
Can I go to the cave by bus from Kassandra?
Wikivoyage says Kassandra is better served by KTEL Chalkidikis buses than the rest of Halkidiki, but it names no stop for the cave. Ask KTEL.
Is there a bus between Kassandra and Sithonia?
No direct routes, says Wikivoyage.
When should I go from the beach?
Check the hours first: summer closing is 20:00, and in winter the cave closes at 15:30 and on Tuesday.
Some links are affiliate links: if you book through them we earn a small commission at no extra cost to you. It funds the research behind this site.