You choose targets as required for a spell while you cast that spell (C.R. 601.2c). After you cast that spell, every other player will know what those targets are before they have a chance to cast other spells in response to that spell. (A spell, such as Murder, can resolve only if all players pass in a row [C.R. 116.4], meaning players will necessarily have priority to cast other spells before that happens [C.R. 116.1, especially C.R. 116.1a; 116.3d].)
You choose targets for your spells when you cast them. It's part of the casting process, after you put the spell on the stack, choose its modes, and way before you are paying for it. Because the targets can influence the costs (eg. Price of Fame). The spell becomes cast as the last part of the process.
Former Rules Advisor
"Everything's better with pirates." - Lodge
(The Gamers: Dorkness Rising)
"Any sufficiently analyzed magic is indistinguishable from science."
(Girl Genius - Fairy Tale Theater Break - Cinderella, end of volume 8)