It depends how important the pay is to you. If it's super-important, ask for some information early (ideally before even applying). If it's not super-important, ask late.
Some applicants genuinely do need a "properly"-paid position, such that however regettably they would have to turn down a poorly-paid one in favour of flipping burgers for the summer. Or any available job they happen to be qualified for that pays better -- high-frequency currency trader, mercenary, whatever they may have been before deciding to train as an iOS developer ;-). Then it would be a waste of both their time and the employer's, to interview for an unpaid position or a position that won't cover whatever it is they need to cover, and it's not unreasonable to try to find out an approximate compensation level before applying. Maybe that's just your living expenses, maybe you also need to make some money towards next semester's tuition fees. I don't know, and neither does the employer, so it's for you to decide what you need.
If you're a homeowner whose house is going to be repossessed if you don't earn at least X thousand dollars over the summer, there's really no point applying for internships that pay only a nominal stipend, let alone the minority that pay nothing at all. Yes, it'd be a missed opportunity to learn, but you have to pace your education to meet your means. If you've got no obligations other than your cellphone contract, then there are more internships out there for you to consider, than would suit the homeowner.
Typically you won't need an exact number, just a rough idea whether the employer is trying to offer a genuine wage, or just trying to cover the living expenses of an enthusastic undergraduate living on a sofa.
Once you're satisified that the position meets your basic requirements (or at least that there's a reasonably good chance that it does), then watercooler's answer applies. The usual time to conduct an actual salary negotiation (or, as is likely in the case of an internship, the proper time to receive their full and final offer) is after all interviews are concluded and they have decided in principle to hire you.
If you would prefer a well-paid position, but can live with an under-paid (or even unpaid) one, then you don't really need to know which is which in advance of interviewing -- just try to get as many offers as you can and take the one that's most attractive once you have all the details. Then you can balance the kind of experience offered, location, pay, and anything else relevant.