Get her to apologise to grandma (if grandma can be trusted to be stern/disappointed). I wouldn't go out of your way to punish harshly though - that's about it.
I agree with finding out why. It could have just been one of those random impulsive things. But if she's feeling like she has no other way to get money and needs money for some reason that should be addressed.
I wrote this earlier and have now refreshed - so I agree with PPs. Complete the grounding/apology/some sort of paying back (if appropriate) and then once that's all done discuss pocket money/sweets with her - if she doesn't get pocket money, it might be an idea to set some up. If she isn't allowed sweets opening a discussion about what is reasonable in terms of sugar consumption. If she already has pocket money but finds it too inaccessible, maybe discuss that. If she has it but spends it too readily and never has any available for what she wants, talk about saving techniques and tips so that she can start to develop this skill. If you don't want her having money for nothing, then the discussion could be about what "job" she could do for you or somebody else in exchange for a little bit of pocket money. Or perhaps that could be an extra step - that because she went about requesting money in a dishonest way she needs to learn about how to earn it honestly, and after a time of doing that, then she'll be eligible for normal pocket money, whatever you think is fair (I personally would think that's a bit overkill for a first offence).
Once you've had that discussion, you can then remind her that it would have been much better, quicker, and more pleasant for her to have brought it up with you in the first place, rather than trying to take the matter into her own hands and stealing, and it then gives her a template for how to discuss future issues she believes are unfair.
If this feels like a reward, it's not - it's simply showing her how she could have and indeed should have dealt with the situation in the first place. By showing her that she can in fact get the outcome she wanted in a much more straightforward and immediate way, she's much more likely to attempt discussion first for any future issues she finds unfair, rather than try and "fix" it in a way she knows is wrong. At nine, while punishing the misbehaviour is important, modelling the way she should have behaved is arguably the most important part of changing her behaviour, and needed to put the punishment into context (rather than being received as "it's so unfair, nobody listens to me").