Can I be penalized for linking to bad websites?
Yes, there is a chance that linking to unrelated or penalised websites will result in a penalty. Google considers your link as a recommendation for the website you are pointing to when you do so.
You may also receive a penalty if you support websites that have SEO issues or a poor reputation in general.
Use the rel nofollow property when linking to a website if you are unsure of its quality.