How can I repair a towel bar with one end ripped out of the wall?
I agree that the best solution here is tell your landlord, provided you have a reasonable one. What does your lease say about routine maintenance? Chances are if you weren't doing chinups on it, you shouldn't be charged. 

However, if you've had a previous experience with this landlord in which they've proved to be unreasonable, you could attempt to fix it yourself.

To do this, find a short length of steel rod with an outer diameter the same as the inside diameter of the sheared pin. Test fit to make sure it all fits together. Mix up some JB Weld, coat the steel rod, and then slide it into the sleeve on the wall, then press the other side on over it. Try to avoid getting any of the epoxy compound on the end of the rod near the wall, as doing so may end up bonding it to the wall rather than just the bracket.