There is no prohibition, per se, against killing insects and it is certainly permissible to do so if they are a cause of bother (for example, mosquitoes). However, one should try to avoid killing them for no reason at all, as this leads to a certain lessening of sensitivity to God's creations