For one, be realistic. A huge, well-known company is not setting up its customers to download viruses and bugs. If the software is coming from a company like Microsoft, it's probably going to be fine. Chances are, you're getting it from their direct site and you've sought it out.
Keep that in mind: Seeking out software is different than having a pop-up forcefully inform you that it's imperative you download a program ASAP. If you're being advised--without any solicitation--that you can hardly live without the program flashing on your screen, better avoid it.
While it sounds obvious, do your research! If a company called "Malevoware" is asking you to pretty please click the "accept" button on their popup so you can surf the web with ease, best you do some internet searching to see what people are saying about the company. Better yet, McAfee Secure has a Site Advisor search that allows you to search different sites to get a safety rating. If you're considering downloading freeware or shareware, just type in the domain and you can see how reliable it is. (And if it isn't, they'll let you know why.)
Remember, an ounce of prevention is worth a pound of cure. Before you set about downloading a free program, do yourself a favor and make sure you have backups of your hard drive or important documents -- a good practice in general.
We would be remiss to ignore another huge, lurking issue that could come with downloading software for free. If you're using BitTorrent or another program that shares pirated software or files, you're exposing yourself to enormous risk. Not only is it (obviously) illegal to download copyrighted software, but you simply can't practice the due diligence described above if you're downloading shared files from users with no trace.
So is downloading free software safe? It can be. But forget about blindly clicking and accepting when it comes to adding programs to your computer. A little research and a lot of caution will keep your computer safe in the end.