The first ring seems to be what one learns first: the underlying group is the cohomology of the total singular cochain complex $C^*(\mathbf{C} P^\infty)$, which is defined as $\oplus C^n(\mathbf{C} P^\infty)$, so we can't possibly get the power series ring.
On the other hand, eventually one learns that cohomology is actually a representable functor in the stable category. Since $\mathbf{C} P^\infty=\varinjlim \mathbf{C} P^n$, perhaps we should have $H^*(\mathbf{C} P^\infty)=\varprojlim H^*(\mathbf CP^n)=R[[X]]$. At first glance this is a logical leap from $H^n$ being representable as a functor to $R$-modules to $H^*$ being representable as a functor to $R$-algebras, but I think this actually follows by abstract nonsense by the naturality of the ring structure on homs coming from a ring object.
Of course this could all be generalized to any infinite-dimensional CW complex, or further, and to more general cohomology theories $E$. I bring it up because the distinction seems in this case seems to matter for complex bordism theory and more generally for complex oriented cohomology theories. Specifically, a complex orientation gives rise to a formal group law in $E^*(\mathbf{C}P^\infty\times\mathbf{C} P^\infty)$, which only makes sense if the latter is a power series ring, not a polynomial ring. But ordinary cohomology is complex oriented, so we see again $H^*(\mathbf{C}P^\infty)$ should be the power series ring.
It seems like the argument in favor of $R[[X]]$ is more solid. But this would imply that the singular chain complex doesn't actually model the cohomology of a space, and would seem to cause problems with modeling spaces in general via $A^\infty$-algebras, which are in particular graded algebras, that is, direct sums of their terms...and don't we want to be able to do this? Maybe we actually want different rings in different situations? Maybe I'm missing something important in the second paragraph? Color me confused! Thanks in advance to anyone who can clarify this.
EDIT: Lurie seems to write down both possibilities in the same lecture notes: in the second paragraph here, the polynomial ring, whereas here, Example 5 showing that ordinary cohomology is complex orientable combined with Example 8 would give the power series ring.
It depends on what you want to do. It's worth noting that you can think about $H^{\bullet}(X, \mathbb{Z})$ (say) solely as a graded ring, by which I mean a sequence $R_0, R_1, \dots$ of abelian groups together with an operation $R_n \times R_m \to R_{n+m}$ satisfying etc. In particular, this definition does not require that I commit to a choice of forgetful functor from graded rings to ungraded rings. There are at least two such functors I could write down:
There are several arguments in favor of $\prod_i H^i(X, \mathbb{Z})$ being the thing you actually want. The basic one is that there are many situations in which you want to write down sums of cohomology classes (e.g. characteristic classes) living in the bigger ring rather than the smaller ring. The story about complex cobordism and formal group laws is a big one, but there are simpler ones: for example, the Chern character of a vector bundle lives in this bigger ring (tensored with $\mathbb{Q}$). More abstractly, $\prod_i H^i(X, \mathbb{Z})$ has the benefit of being representable by a space, namely the corresponding product $\prod_i B^i \mathbb{Z}$ of Eilenberg-MacLane spaces.
(By the way, this is not what people mean when they say that cohomology is representable in the stable category. What that means is that there is a spectrum $H \mathbb{Z}$ such that the spectrum of maps from (the suspension spectrum of) a space $X$ into $H \mathbb{Z}$ is a spectrum whose homotopy groups reproduce the cohomology groups $H^i(X, \mathbb{Z})$. The thing that is representable is a functor that outputs spectra, not graded abelian groups.)
It implies nothing of the sort; singular cohomology gives you a graded ring in the above sense, and as mentioned you don't need to commit yourself to a choice of forgetful functor down to ungraded rings to say this.
Do you mean thinking of a space $X$ in terms of cochains $C^{\bullet}(X, \mathbb{Z})$ on $X$? Again, this is a graded object and you don't need to commit yourself to a choice of forgetful functor down to ungraded objects.