Let $H$ be an infinite dimensional separable complex Hilbert space. All C*-subalgebras of $B(H)$ are assumed to be non-degenerate.
The spectral projections of a self-adjoint element $T$ of $B(H)$ lie in the weakly closed algebra generated by $T$. In the early 1970s Pedersen proved that if a C*-subalgebra $A$ of $B(H)$ contains all of the spectral projections of each of its self-adjoint elements, then $A$ is weakly closed.1 In his words, this "characterizes von Neumann algebras (on separable Hilbert spaces) as the only C*-algebras in which the spectral theorem can be used in its full force."2
On the other hand, suppose we start with an arbitrary C*-subalgebra $A$ of $B(H)$. Must we go all the way to the weak closure to use the spectral theorem for self-adjoint elements of $A$? If not, does iterating the process of taking the smallest C*-algebra in which we can apply the spectral theorem lead to the weak closure in a finite number of steps? Pedersen asked this question over 30 years ago as a way to end a chapter on concrete C*-algebras,3 and I don't know if it has been answered. If the answer isn't known, I'd accept an answer giving a more recent reference that discusses this. For the precise question, I'll just quote Pedersen:
For any C*-subalgebra $A$ of $B(H)$ define $a(A)$ as the smallest C*-subalgebra of $B(H)$ containing all spectral projections of each self-adjoint element in $A$. It is easy to verify that $A\subset a(A)\subset A''$. If $H$ is separable is then $A''=a(A)$? This failing, is $A''=a(a...a(A)...)$ (finitely many steps)? Note that by 2.8.8 a transfinite (but countable) application of the operation $a$ will produce $A''$.
1 G. Pedersen, C*
-algebras and their automorphism groups, Corollary 2.8.8, p. 38.
2 Ibid., p. 39.
3 Ibid.