+1 agreement with EmptyTank.
The majority of the time, I believe it's safe to solo. The more difficult the conditions, the more likely I would want a good teammate.
I grew up solo diving. Often, my family would be fishing and I'd go scuba diving. I did my first night dive solo, my first surf entry dive solo, my first ice dive solo, learned to dive my drysuit solo, achieved all my personal best freedives solo before verification with others, and to this day continue to do lots of new dives solo. As a kid, I didn't have as much access to dive buddies (many adults don't want to spend the day with a teen dive buddy) and training back then was a lot better at the OW level than it is today. Plus, I was young, brave, dumb and lucky. Now, if I have any doubts about the conditions or my safety, I'll dive with a team.
Too many variables. I recently made a solo dive into a cave we named "Malcolm's Nightmare" in the Caribbean. So named because the conditions are about the worst one can imagine starting a cave dive. I don't think this place is even remotely safe for a team. In this case, you can lose either way. Each time I go inside, I'm thankful and amazed to emerge. Conversely, I like night diving in shallow water from shore with a buddy in New England because conditions and scenery remind me of
Jaws. Even though shark attack is rare, I still get the heebie jeebies.