How to prevent plugin, theme installation failures on WordPress?

It’s either the configuration of the path where WordPress is installed (you don’t have the right path setup) or if the path is correct, you don’t have got enough permissions to modify the file system.

So as this answer is very broad, that’s because it is of a very technical nature that is bound to your concrete hosting environment. Please contact your hosting support and figure out together with them which path and permission settings are needed for your WordPress installation.

In case you copied over your blog from another system, please reset the path related configuration constants and options. Check your wp-config.php if you make any specific settings in there.