You can use it to express the fact that you don't care about another's sadness or unhappiness. You can also use it to refer to the act of crying excessively in front of somebody.
If your partner broke up with you then complained about being bored, you could reply, "cry me a river."
If a child was having a tantrum because he or she didn't want to go to school, mother might reply, "you can cry me a river, but you're still going to school."