Could be a bit short, depending on how much booze and partying you want.
- A 7-day pass for public transport is less than €40. Together less than €200Month passes exist for calendar months or 30-day periods, a bit over €80. Depending on the timing ofI'm assuming that the Bonn trip, you might need only four weeks. will be in the middle of the visit?
- The train return ticket is around €130, depending on how early you book.
- Food is possible for €15 or less, especially if you can use your friend's kitchen and fridge. It makes a difference if you buy prepared sandwiches or bread, butter and the rest.
That leaves €220 for the other points you mention. Museum tickets and nightlife can be expensive. No idea about the SIM card for a month.