The problem with your code is that N[Product[...]] calls NProduct[...] which turns integers into reals before Prime can evaluate, causing the error: See Details and Options section of documentation of NProduct.
For your calculation, you actually do not need these. It looks like the result converges around $0.660162$:
Table[N[Product[(Prime[i] (Prime[i] - 2))/(Prime[i] - 1)^2, {i, 2, 10^k}]], {k, 5}]
{0.665138, 0.66033, 0.66017, 0.660162, 0.660162}
Since the product is monotonic and you are using N at the end, it is not necessary to carry out whole multiplication all the way upto infinity: Depending on the interested accuracy, you can go to higher orders as well. For example,
Table[N[Product[(Prime[i] (Prime[i] - 2))/(Prime[i] - 1)^2, {i, 2, 10^k}], 8], {k, 5}]
yields
{0.66513840, 0.66033029, 0.66017020, 0.66016232, 0.66016185}
which reveals that using only first $10^5$ primes, which is all primes upto $1299709$, is sufficient to get a result with error of the order $10^{-6}$.
For the record: Mathematica fails to do the calculation analytically:
Product[(Prime[i] (Prime[i] - 2))/(Prime[i] - 1)^2, {i, 2, Infinity}]
$\prod _{i=2}^{\infty } \frac{\left(p_i-2\right) p_i}{\left(p_i-1\right){}^2}$
NProduct[]sometimes try to evaluate terms for inexact arguments, so a more clever approach is necessary. – J. M.'s missing motivation Oct 21 '18 at 08:09InfinityinsideProduct, as there will possibly be no results. Try a big number instead, like 100000 – t-smart Oct 21 '18 at 08:32