The only really solid rule I've seen stated for accidentals is that you want to use sharps when you're going up (as in, playing a rising sequence of notes) and flats when you're going down.[1] There are also many, many people out there who will tell you that you use sharps when the key signature has sharps and flats when the key signature has flats, which (1) is really easy to implement, but also (2) makes no sense.
Anyway, my first guess for a double sharp would be that you're e.g. notating an F# which is itself sharp for whatever reason, and you can't just notate it as a G because Gs are also sharped. (As will be true in any key signature with three or more sharps.) Then the reason for marking F𝄪 rather than G♮ is exactly the same as the reason you'd mark F# rather than G♠in a key that didn't sharp either note. And even from a pure usability perspective, if you're in a key with three sharps and you're doing a lot of alternating between F𝄪 and G#, it's kind of nice having the two notes at the positions of F and G so that you can give them the appropriate accidentals once per measure instead of every time you play either note, the way you'd need to do if they were both on a G.
I ran into some trouble with this exact problem when engraving this score recently: https://musescore.com/user/36584999/scores/7810499
The first half of the vibraphone part looks like you're mainly doing downward variations, so I wrote it with flats. But the second half obviously suggests that it wants F#s rather than Gâ™s, and it felt really weird to use F# sometimes and Gâ™ other times.
Since I know virtually no music theory, my approach was to ask people for help on the internet. I found someone who had majored in music theory and his response was "hmm, interesting", followed by asking a bunch of his friends. Consensus eventually worked out as something like "Hmm, interesting! Could go either way, but maybe F# is a little better than Gâ™. Whatever you choose, be consistent."
It was all fairly unsatisfying and I'd be interested in other comments on how the accidentals in the piece should be marked. Following the general theme of "F# looks a little better, but be consistent" I interpreted every accidental anywhere in the piece as a departure upward rather than downward. :/
[1] I've also seen sharps used while going down, but it was pretty obvious what was going on there - the music had changed keys, but the score hadn't changed key signatures. Those sharps just reflected the new key rather than being departures from it.