Some cities have groups of semi-legal, semi-organized nighttime bike rides in the summer. I thought it might be fun to try it once, but I’m a slow rider. If I get “dropped” by the group and end up riding alone, it would be most unsafe. I’d have to call a cab to get home.
If you can get a cab to come to your location after dark. There are places in lots of cities that cabs won’t go to at night. I got stuck at one of those locations once. Luckily the Mexican cleaning couple were just finishing up and I gave them $20 to give me a ride to a motel on the other side of town.