GOKAAAAI... SILVER!
Star’s lines all indicate what her problem was.
Starlight Glimmer: And just like that, my friend was gone. His family recognized his magical talent and sent him off to Canterlot. I never saw him again.
Spike: Well, why not?
Starlight Glimmer: Because of his cutie mark! He got his, and I didn't! He moved on, and I didn't! I stayed here and never made another friend because I was too afraid another cutie mark would take them away, too!
Twilight Sparkle: That's ridiculous. A cutie mark can't take your friends away.
Starlight Glimmer: Not everypony's lucky enough to get her cutie mark at the same time as her friends!
It really seems like her issues came from the timing of it all. Based on her flashback with Sunburst, she seemed completely unaware of how good she was with magic as a kid, since she assumed Sunburst was amazing, and whenever we saw her nonchalantly doing all this impressive magic without even registering what she’s doing, it looked like she thought she was just following Sun’s guidance.
I agree, but I’m also taking Starlight’s personality into account here. She honestly thought that he’d abandoned her, and season 6 reveals that he kinda did. Out of shame, he made no effort to contact her, and the whole thing left her too afraid to make any new friends.
Those moments where she was doing really powerful magic, she was doing them around sun and only after he demonstrated a spell or technique to her first, also they were always alone together. Since she herself honestly believed he was a powerful wizard, I can imagine her brushing off her own talents there as being due to how amazing he was as an instructor.
“When we were foals, Sunburst knew everything there was to know about magic. He always knew just what to do. And he was always there to help me. I guess it’s not surprising that Sunburst got his cutie mark in magic and… went off to Princess Celestia’s school.” Star is saying all of this sincerely while the episode shows clips of her clearly outpowering and overshadowing him.
Then after he left she never really showed off her magic until she discovered her cutie mark, and by then the damage was done and she thought he’d moved on.
SUPER late response on this, but my hardcore Starburst shipper leads me to believe that Starlight may have had a massive crush on him that never really went away, so it wasn’t just sadness over a friend leaving; it was heartbreak.
And I also think it was probably mutual, in that Sunburst wouldn’t have written to her out of fear that she would no longer like him because he wasn’t as powerful as she thought. Also, note that the one time Sunburst actually cast powerful magic of his own was when Starlight was in danger.