The significance of her middle name is never stated in the epilogue.
It's never even stated that her middle name is actually in honor of Luna Lovegood. It's a fair assumption that it is, though, since she is the only Luna mentioned so far. In addition, the epilogue is the end of the Harry Potter series. There would be no reason to write in another Luna who we've never seen before, and if Lily was meant to have a middle name not related to anyone we know, she would have been given a name that wasn't shared by anyone who played a significant part in the story.
However, though Luna was a good friend to both Harry and Ginny, she seems like an odd choice to name one of their children after. She did also contribute to the war, and I'm not suggesting that she's unimportant or didn't have a meaningful role in Harry's life.
But Harry can't possibly name a child after everyone who's meant something to him. There are far too many people who have helped him for that to be possible. He'd have to either have a ridiculously large number of children or give them all Dumbledore-style long names to honor everyone who deserves it. There's Arthur Weasley, Neville Longbottom, Mad-Eye Moody, Professor McGonagall, Tonks, Cedric, Kingsley Shacklebolt, and presuming that we don't put any criteria other than "were important positive figures in either Harry's or Ginny's lives", the list goes on. It would make sense for them to, either consciously or not, limit the list of name choices somehow.
Considering the fact that Harry and Ginny would have to choose carefully who they honor with a name, Luna is an odd choice. She was their classmate, and is presumably still alive at the time they named their daughter. Unless they grew apart over the years, they also probably still see Luna and have contact with her. Something similar could be said about Neville. He was a significant presence in both Harry's and Ginny's lives, and performed heroic acts during the war. However, none of the Potter children have a name related to Neville. Which is understandable - the epilogue shows that the Potter family has remained close with him, and he is living a happy life as the Herbology professor at Hogwarts. Both Harry and Ginny liked Luna, so it seems likely that they would have kept up some level of friendship with her - and if for some reason they didn't and had a falling out with them, they probably wouldn't want to name their child after her.
The big thing that the names of Harry's children have in common, other than being people who have meant the most to him, is that their namesakes are all dead, and died in a tragic way as a result of the wizarding war. This is most likely because Harry wanted to honor those who had died in the war, and who gave their lives to help him win it. It's also a way to manage the list of choices somehow. In addition, it's more practical to name children after a dead person than a living one. Having two living people with the same name could be confusing, especially if Harry has stayed in close contact with the original owner of the name - which if he respected them enough to name a child after, he likely would.
The best theory I've heard is that it's also in honor of Lupin, but this is not proven.
Harry's first son, James Sirius, was named after his father and his godfather. Harry's second son, Albus Severus, was named after his mentor who was dead and the teacher who suffered and ultimately sacrificed his own life for Harry. Lily is the youngest Potter child, and her first name is in honor of Harry's mother.
Maybe Harry also wanted to honor Lupin with his child's name, but since she was a girl, he couldn't exactly name her Lily Remus, because Remus is obviously a boy's name. There's also no feminine form of either Remus or Lupin. So if he wanted Lily's name to be in honor of him, he'd have to be a bit more creative.
Luna sounds like Lupin, and means moon. Lupin was a werewolf whose transformations were caused by the full moon, and Lupin's Marauder nickname was Moony. Both he and Ginny would have positive associations with the name due to Luna Lovegood, since they were both good friends with her. Those might not be enough to convince them to name their child after Luna alone, but it might help contribute to them choosing the name in honor of Lupin.