This question drives at what value a shareholder actually provides to a corporation, and by extent, to the economy.
If you subscribe for new shares (like in an Initial Public Offering), it is very straightforward to say "I have provided capital to the corporation, which it is using to advance its business." If you buy shares that already exist (like in a typical share purchase on a public exchange), your money doesn't go to the company. Instead, it goes to someone who paid someone who paid someone who paid someone (etc.) who originally contributed money to the corporation.
In theory, the value of a share price does not directly impact the operation of the company itself, apart from what @DanielCarson aptly noted (employee stock options are affected by share price, impacting morale, etc.). This is because in theory, the true value of a company (and thus, the value of a share) is the present value of all future cashflows (dividends + final liquidation). This means that in a technical sense, a company's share price should result from the company's value. The company's true value does not result from the share price.
But what you are doing as a shareholder is impacting the liquidity available to other potential investors (also as mentioned by @DanielCarson, in reference to the desirability for future financing). The more people who invest their money in the stock market, the more liquid those stocks become. This is the true value you add to the economy by investing in stocks - you add liquidity to the market, decreasing the risk of capital investment generally.
The fewer people there are who are willing to invest in a particular company, the harder it is for an investor to buy or sell shares at will. If it is difficult to sell shares in a company, the risk of holding shares in that company is higher, because you can't "cash out" as easily. This increased risk then does change the value of the shares - because even though the corporation's internal value is the same, the projected cashflows of the shares themselves now has a question mark around the ability to sell when desired.
Whether this actually has an impact on anything depends on how many people join you in your declaration of ethical investing. Like many other forms of social activism, success relies on joint effort. This goes beyond the direct and indirect impacts mentioned above; if 'ethical investing' becomes more pronounced, it may begin to stigmatize the target companies (fewer people wanting to work for 'blacklist' corporations, fewer people buying their products, etc.).