How to know if a side-loaded app is safe? How can we be assured that the APK of an app that we are downloading from a website is safe to install on our Android phone? 

Is there a way to know that the downloaded file is safe? Is there an app or service that scans the APK file and says This file is safe to install.
It is difficult to know whether an APK is safe or not. Your best bet is to download from trusted or reputable sources (like Google Play, Amazon, etc). 

Some (trusted) developers also provide an MD5 (or other message-digest algorithm) hash of their APKs. After your download the APK, you verify if the APK has the same hash. If it does, then it's safe to say it hasn't been tampered with.

You can also check the permissions required by the APK / app, and use common sense (or your own judgement / instinct) to tell if it's safe to install or not.

BOTTOMLINE: Always install from trusted sources. Stay away from pirated APKs; it's possible they may have malware.