It took me about 15 tries to get a Thunder Stone yesterday, but when I was playing for Dawn Stones, I got it on my 3rd try. Sometimes, I think the trick is to not beat it as quickly as possible, but to beat it in like 30 or 40 seconds. I probably just got lucky when I waited that one attempt, so it may not be true.
It's probably somewhat random. One time I wiped the floor with the Balloon Bot every time and it took me 12 tries to get a Dawn Stone, and one other time I barely made it in the target time and got my Shiny Stone in one go. --- Hey, I'm just an asocial Victini. No need to take my advice to heart!