Even if a piece of software is coming from an official source, like the Android Market, it doesn't make it safe or secure. Even reputable developers might have a ticking time bomb waiting on their apps.
Make sure to always read the comments and see the ratings on any software you're about to install on your smartphone. Always search the web for even more info about that software. Read all the requested permissions before installing, be suspicious of software requiring an endless list of permissions.
Read more about it here.