Yes, links can get your site penalized if built the wrong way using tactics that have been deemed inappropriate by Google.
There is an entire segment of the SEO community to make a living off of scaring people away from agencies that openly employ link building methods. But they are only scare tactics to make sales, and they are all buying links.
Before Google, search engines used to try to grade and rank sites based on their content. This gave rise to "keyword stuffing" because early engines graded a page based on the content's keyword density on a page.
Then Google came along, and they started using links as a factor to help determine the winner of a page.
Back then, if your content was moderately about the topic and you had the most links, you'd rank number 1.
Today, Google Penguin and other algorithm technologies have changed the engine optimization rules regarding the quality, type, and frequency of links your site can get and be "safe."
If you get in a hurry to rank and generate too many links at once from the wrong places, you potentially could get a link penalty.
That is where the art of link building comes to play
You have to understand the types of links that are allowed, the best places to get them, and if you need to be building links to your
backlinks to make them worth more.
As Google changes the rules with every update, today's useful links could be harmful, and today's bad links could be useful.
That's the art and science of search optimization.