For a prime $p\equiv 1\pmod{4}$, we can write $p=a^2+b^2=N(a+bi)$. Therefore $$ a+bi=p^{1/2}e^{i\varphi} $$ where $\varphi\in [0,2\pi]$. I know that Hecke proved that $\varphi$ is equidistributed. I am looking for a reference for this nice result. I would be thankful if one can give me a reference.
One reference is Theorem 6 of Chapter XV (Density of Primes and Tauberian Theorem) in
S. Lang: Algebraic Number Theory (AddisonWesley, 1970).
This is probably more general than Hecke's result, but the case of "equidistribution of ideals and primes in sectors" of the Gaussian numbers is singled out as Example 2 on page 318.
[No, I didn't know this off the top of my head; my student David Jao needed this result in the case of a real quadratic field for his thesis in 2003, and I looked in the bibliography to find that he used the Lang reference $$ or more accurately its second edition (1994) by Springer.]

2$\begingroup$ It seems that Hecke also did the case of real quadratic fields  I learnt this through MO's question mathoverflow.net/questions/65059 See in particular Zentralblatt's review of Hecke's original article, which I cited in the comments. I never actually read Hecke's original paper though. $\endgroup$ – François Brunault Jun 11 '13 at 20:30

$\begingroup$ Lang states Theorem 6 for an arbitrary number field and asserts simultaneous equidistribution at any finite number of places, archimedean or not. Though it's possible that Hecke did even that in his original paper, which I haven't seen either. $\endgroup$ – Noam D. Elkies Jun 11 '13 at 20:54

2$\begingroup$ When Lang published "Algebraic Numbers" (which was the skinnier predecessor to "Algebraic Number Theory" he had a generalized version of Hecke's theorem, followed by an example (I'll dig out my copy tomorrow to find the details). When Lang gave me a copy of the book (around 1965 or 1966) there was a one page erratum in the front, basically stating that the hypotheses of the theorem in question were too general, and that the example he gave was as wrong as could be: he quotes JP Serre as saying that there was no reasonable measure for which it was equidistributed. $\endgroup$ – Victor Miller Jun 12 '13 at 2:47

1$\begingroup$ But is it still wrong in the 1970/1994 book? The 3rd example (immediately following the angular equidistribution of Gaussian primes) is credited to J.P. Serre, so I'd expect that Lang has accounted for Serre's critique.) $\endgroup$ – Noam D. Elkies Jun 12 '13 at 3:23

$\begingroup$ @Noam, I'm pretty sure that it was corrected in "Algebraic Number Theory". Lang had the commendable inclination to try to clean up existing theorems, with an eye towards making them more general, but somethimes he (and all of us are usually in that boat) went a little too far. $\endgroup$ – Victor Miller Jun 12 '13 at 17:21
A very downtoearth treatment of this result of Hecke is in Chapter 5 of the nice book Geometric and Analytic Number Theory, by Hlawka, Schoißengeier, and Taschner. By downtoearth, I mean that they deal directly with this specific case of Hecke's result, and that they prove it using very little  the method is a modification of the KorevaarNewmanZagier approach to the prime number theorem, and so doesn't need any quantitative zerofree region (just a statement that there are no zeros of the appropriate objects on the line $\Re(s)=1$).
If you need the original reference, this is proved in Hecke's articles (here and here) where he introduces the famous $L$functions associated to Grössencharakteren.
E. Hecke, Eine neue Art von Zetafunktionen und ihre Beziehungen zur Verteilung der Primzahlen. Math. Z. 6 (1920), no. 12, 1151 ; Math. Z. 1 (1918), no. 4, 357376.
Here is an extract from the Zentralblatt review of Hecke's articles :
Übersetzt man den so gefundenen Sachverhalt in die Sprache der Formentheorie, so ergeben sich Sätze von folgender Art: Jede der Formen $x^2+y^2$ und $x^2−2y^2$ stellt unendlich viele Primzahlen dar, wenn man die Variabeln $x$, $y$ auf eine beliebigen Winkelraum einschränkt, welcher von zwei vom Nullpunkt der $x$−$y$Ebene ausgehenden Halbstrahlen begrenzt wird. Überdies ist die Anzahl dieser Primzahlen unterhalb $t$ für $t \to > \infty$ asymptotisch proportional der Grösse dieses Winkels, gemessen in einer auf die betreffende Form gegründeten KleinCayleyschen Massbestimmung.

2$\begingroup$ "stellt unendlich viele Primzahlen dar"! I never realized that the prefix dar of "Darstellung" was separable. Meanwhile, I see that (not surprisingly) these papers also appear in his collected works: #12 (215234) and #14 (249289) in E.Hecke, Mathematische Werke, Göttingen: Vandenhoeck & Ruprecht 1959. $\endgroup$ – Noam D. Elkies Jun 12 '13 at 21:37