Wordpress.com is relatively more secure than wordpress.org because they limit the themes and does not allow plugin's installation. However, security depends on the hosting company of your website and also what steps they are taking to prevent the security problems.