Nowadays many wordpress sites are getting affected by malware and often hosting companies do very little to help website owners on this.
If a website gets affected, google start displaying a warning message in its search and sometime hosting companies suspend the hosting account or offer their paid cleanup services.Here here is some important points to consider for malware prevention:
1. get SSL certificate for your website
2. Make sure your wordpress themes, plugins are all up to date.
3. Install security plugins like All in One WP Security and Wordfence
4. Use very strong password for wordpress admin.
5. Use akismet for spam protection.