This answer actually depends. Prisoner 1 can see both 2 and 3, as well as their hats. Meaning that if both of them are wearing the same colour, his is definitely the opposite colour. In this case prisoner 1 is the first to shout out.
On the other hand, if 2 and 3 are wearing different hats, 1 can say nothing. In such a case, 2 can deduce that he and 3 are wearing different hats (judging by 1's silence). In this way, 2 can look at 3's hat and conclude that he's wearing the opposite colour. So in this case, prisoner 2 shouts out first.