Theseus says this near the end of the play. It means that the best play is only a shadow (a limited outline or imitation of life), and the worst play no worse (than the shadow, or than the play put on by the rude mechanicals). It shows Theseus' kind character, nudges the audience that they've been laughing at people's limitations (rather than entering into the spirit of the play), and comments on the larger play itself that the audiences is watching.
It is a play within a play as the other answer says
but more broadly it applies to the whole play
midsummer night's dream and then beyond that
in some way to all this world of appearances--
compunded of reality and illusion as singer's
gimpel the fool remarked.
also the note that 'no worse' with the addition of
imagination is happy advice for seeing and
listening to many things isnt it?