Presumably her parents (Amy and Rory).
The first mention of Melody Pond's name is at the start of the episode A Good Man Goes to War:
(On Demon's Run, an asteroid modified into a habitation, a baby has been born. Her name is Melody Pond.)
AMY: I wish I could tell you that you'll be loved, that you'll be safe and cared for and protected. But this isn't a time for lies. What you are going to be, Melody is very, very brave.
And later, they have a slight disagreement over her surname:
DOCTOR: Melody? Hello, Melody Pond.
RORY: Melody Williams.
AMY: Is a geography teacher. Melody Pond is a superhero.
There's an interesting blog post about this here, which analyses how common the first name Melody was and how strange it would be for Amy and Rory to come up with such a name (the answer: not very). Sorry for the massive quote:
Melody is currently (2010 figures) sitting at #198 in the US girls’ charts. It’s been climbing steadily for the last decade – it was #436 in 1999, jumped in 2000, and continues to rise. On a longer scale, it’s a keeper: Melody hasn’t been out of the top 1000 since 1942. Its heyday was the late 1950s through to middle 1960s, reaching an all-time usage high in 1960: 479 Melodies in every million baby girls.
The last Melody spike is about two generations ago – assuming a 25-year generation gap (it’s widened slightly over time, but it’s a round figure) the adult Melodies are going to start becoming grandmothers right about now.
People don’t tend to give their children names of their own generation. When naming a child, people want something that sounds interesting and fresh, not something that conjures a mental image of name-calling and school registers. [...] Sure enough, Melody goes down and down and down after the 1960 spike, and its absolute nadir is in the mid-1980s – just about when, with a 25-year generation, the 1960 Melodies would be naming their own children.
Names from one’s parents’ generation, though, are sometimes fair game, especially if they’re known-but-not-common. They aren’t depressingly familiar, but you heard them around somewhere. And they’ve had a generation out of the public eye to recover, as it were. Three generations apart, the effect can be even more pronounced, as people jump on their grandparents’ names that are just so delightfully vintage and retro now. (Florence, Faith, Lacey, Stanley and Arthur are all currently in the England and Wales top hundred.) Depending on the age of Amy’s parents and grandparents, we could be seeing either the two-generation or three-generation cycle in effect – remember, it’s been charting in the US since 1942.
So it’s actually pretty plausible that Amy would have come up with Melody from somewhere, if she had childhood memories of an adult Melody – perhaps even her geography teacher – and nicely poised between trendy and zany, which seems pretty in line with Amy’s traditional but not too traditional character. (White wedding, but didn’t change her name.)
This isn’t the first time Doctor Who, and specifically Stephen Moffat, have proven surprisingly astute in their baby-naming choices. Way back in 2008, Moffat’s two-parter Silence in the Library and Forest of the Dead saw then-companion Donna Noble uploaded into a simulation wherein she married another uploaded personality and had little simulated babies whom she named Joshua and Ellie. That year in England and Wales, Joshua was #5 on the boys’ charts and Ellie #16 on the girls’. Bang on trend.