Sorry to hear of your crash. You didn't provide much detail, but it seems like this happened after dark? If so, yes, riding after dark is inherently riskier, but it is manageable with a good headlight (also tail light) and extra care. Whether the risk is worthwhile, is a personal decision.
Rest up, recover, and learn from this. These things happen.