Good question. It's a passage that puzzles a lot of readers. Here it is:
We two alone will sing like birds i' the cage:
When thou dost ask me blessing, I'll kneel down,
And ask of thee forgiveness: so we'll live,
And pray, and sing, and tell old tales, and laugh
At gilded butterflies, and hear poor rogues
Talk of court news; and we'll talk with them too,
Who loses and who wins; who's in, who's out;
And take upon's the mystery of things,
As if we were God's spies...
(Act V, Scene 3)
First, some context. Cordelia's army has lost the war, and the mad old king has been reunited with his daughter. She is now being led away to prison - as is King Lear - but Lear, by this late stage in the play, has realised that his other daughters, Regan and Goneril, have deceived him and lied to him. He 'sees better' (to quote another line in the play) than he did at the start. He's realised that Cordelia is good, honest and true.
This is why this speech is so moving. Even when Lear is being taken away to prison, he says that he and Cordelia will sing like caged birds - not be like men behind bars, but happy, singing birds. He'll bless her (meaning to approve of her and wish her well) and ask her to forgive him (presumably for the mistakes he's made so far in the play!).
In this way, ('so'), Lear says, they will live - and 'tell old tales' and 'pray' and 'sing'. It's a vision of a simple, happy life reunited with his favourite daughter (and let's face it, she was always his favourite).
So now we come to the gilded butterflies. There are two possible readings. One is really simple: along with the other list of happy things the two will do together, they'll laugh at butterflies when they fly past. 'Gilded' can just mean 'golden' - a reference to the pretty colours of the butterflies' wings.
The other reading is more in line with the next bit of the speech:
This interpretation imagines that the gilded butterflies are the well-dressed, glitzy, dressed up people flitting around at the court. Lear thinks that he and Cordelia will laugh at the pretensions of people who think court life - in the royal palace - is important, and who dress to impress. They'll also listen to the poor fools (or 'rogues', to use Lear's word) talk about who has the king's favour and who doesn't.
What Lear has realised, though, is that the wealth and the finery of court dress and of 'important life' is unimportant - what really matters are the simple things. It's a sad moment of realisation which has cost Lear a lot to achieve.
I always thought butterflies was a metaphor for beautiful people (so in this case King Lear's two eldest daughters) however as said below in the answer by 'robertwilliam', he has realised that Cordelia is honest and good.
By definition, 'gilded' means to cover with or as if with a thin layer of gold. It can also mean to adorn unnecessarily something already beautiful. Butterflies are beautiful and therefore there would be no need to 'gild' it. It is also unpractical to cover it with gold because then, it wouldn't be able to fly.
So, in modern times, this could be talking about all those pretty people that get plastic surgery, when in fact, they looked a thousand times better before.
King Lear recognises the idiocy of gilded butterflies obscuring their natural beauty. Also, in a different version of the metaphor, gilding is only covering it with a thin gold-leafing- not even proper gold. Hence it is basically worth nothing. A gilded butterfly only looks like solid gold. Only those, like King Lear, who know better, can laugh at it.