Does google penalize sites that use templates instead of a unique design and unique code? I'm talking about templates people can get for free...
not really, it's readable content for search engines (TEXT) that might case a duplicated content penalties and only if it's the same
I don't think so. Why punish a website for using a free template? Ultimately, it comes down to your site's current status. Important factors are good meta structure, optimized and unique content, domain name age and the quality of overall site parameters. From there it is just a matter of link building and developing rank. I really don't see why Google would even pick up on the fact that you used a free template, unless you did no customization and left the template in it's original form...which wouldn't serve any purpose at all.
A default blogger layout is a free template. Does google care? The answer is no. What it cares about is content and links, that's all.