This expression is used to state that you do not have any money.
Let’s say one of your friend comes and invites to a restaurant to have dinner and maybe a couple of drinks. When you are about to say “Yeah, great. I’ll come.”, you notice that you do not have such money to spend and you say “Sorry bro. I am broke. I cannot come.”.
P.S. If you have a really really good friend, s/he would say “Oh, come on. We are friends. It’s on me.”