Why do some political parties oppose capitalists

(Note: not all Green parties oppose nuclear; see the greens are no longer anti-nuclear in Finland)

If we got all our energy from nuclear power, identified resources with extant widely deployed reactor types would last us five (5) years. This is unsustainable. (However, there exist technologies at various levels of readiness levels that can potentially extend this by a factor of 100 or more.)

Uranium and thorium are non-renewable energy sources. Therefore, nuclear power is not sustainable and impossible to use indefinitely. There's not that much currently available:

In terms of years of world energy consumption in 2000 (yWEC) these uranium resources, used in non-breeder fission reactors, would produce at a minimum an energy equivalent to 5 yWEC (identified resources), 10 yWEC (undiscovered resources), 20 yWEC (phosphates resources) and 900 yWEC (oceans resources)

Source: European Research Course on Atmospheres, 2011

For an example of a Green party politician using this argument, see Baerbock in Germany (link in German; thanks to comment by user Jan for pointing this out). The same source also quotes Fridays for Future climate activist Greta Thunberg (not in any political party afaik, but probably viewed positively by many green party members) holding a similar position.

Theoretically, resources that will last longer exist. Those are not currently technologically or economically available on a large scale, and mining from the oceans would raise unclarified ownership questions. With nuclear reprocessing or breeder reactors that can (also) burn thorium, we could last a lot longer (from what I've read, around a factor 100). There aren't many breeder reactors around, and nuclear reprocessing has its own disadvantages (see the linked wikipedia article).

Of course, only a fraction of world energy consumption is nuclear (about 4% of energy consumption and 10% of electricity production), and even if we were to adopt nuclear power much more massively than we do now, that fraction will never be close to 1; reserves should last by yWEC/f where yWEC is years of world energy consumption and f is the proportion of energy from nuclear fission. At 2014 consumption levels, identified resources are expected to last 135 years (see Wikipedia on Peak uranium for more details), so unless we identify more resources, 4× more nuclear energy would mean proven resources only last for about 35 years, less than the lifetime of a nuclear power plant.

Nuclear fission fuels are even less renewable than fossil fuels. Fossil fuels are produced by biological processes on Earth and are, strictly speaking, renewable on a scale of tens of thousands to millions of years. Nuclear fission fuels are only produced in stars and can only reach Earth as trace amounts in meteorites.

A large-scale commercial deployment of breeder reactors does not currently exist. There are only two commercially operating breeder reactors as of 2017: the BN-600 reactor, at 560 MWe, and the BN-800 reactor, at 880 MWe. Both are Russian sodium-cooled reactors. Their development would require significant research and development, and may require extensive subsidies before it can be economically independently profitable, if at all (for any research and development, the outcome is uncertain). Green parties argue that such money may be better invested in technologies that don't share the disadvantages mentioned in other answers.

Green parties argue to make a transition to renewable, sustainable sources of energy. They argue that nuclear fission power is not, and that is an argument that can be backed up by some evidence.

(Nuclear fusion power is beyond the scope of this answer.)