。
A great idea suddenly occurred to her.
Literal
Great-idea [subject-が] suddenly her [to-に] surfaced.
Uses に to mark the person to whom the idea came — a classic Japanese 'experiencer に' construction where the person is the dative recipient of a mental event. 突然 ('suddenly') modifies 浮かぶ. A vivid mental moment.