If someone is complaining, whinging, sulking, bitching or moaning about something, no matter how pathetic or meaningful it is, you can tell them to write a play about it to shut them up.
Sort of means, "i could care less...!"
Bec: Nnnyeh, go write a play about it
Tom: Linda just broke up with me! *sob*
Luke: Why don't you write a play about it?
Ally: You forgot my birthday! I feel so hurt and let down.
Harry: Yeah, get out some paper and write a play about it.