In Germany: to a limited extent, yes. Publicly accessible professional profiles (LinkedIn, Xing, public GitHub repos, public websites) may be viewed. Private profiles may not be infiltrated through friend requests or similar means. Facebook and Instagram are off-limits under GDPR interpretation when they are clearly private. Practical advice: Google yourself and make sure nothing compromising is publicly visible.
Sources & Data
Want to know how well your CV matches your target role?
Am I allowed to ask a competitor if they have open positions?
Can my employer issue a poor work reference upon my departure?
Can my prospective employer check my social media?
Do I need to provide a police clearance certificate for my application?
Do I have to disclose my criminal record in a job interview?