We study the problem of a profit maximizing electricity producer who has to pay carbon taxes and who decides on investments into technologies for the abatement of carbon emissions in an environment where carbon tax policy is random and where the investment in the abatement technology is divisible, irreversible and subject to transaction costs. We consider two approaches for modelling the randomness in taxes. First we assume a precise probabilistic model for the tax process, namely a pure jump Markov process (so-called tax risk); this leads to a stochastic control problem for the investment strategy. Second, we analyze the case of an {uncertainty-averse} producer who uses a differential game to decide on optimal production and investment. We carry out a rigorous mathematical analysis of the producer's optimization problem and of the associated nonlinear PDEs in both cases. Numerical methods are used to study quantitative properties of the optimal investment strategy. We find that in the tax risk case the investment in abatement technologies is typically lower than in a benchmark scenario with deterministic taxes. However, there are a couple of interesting new twists related to production technology, divisibility of the investment, tax rebates and investor expectations. In the stochastic differential game on the other hand an increase in uncertainty might stipulate more investment.