The precise meaning of "to have something to do with"?
Solution 1:
There is no strict direction of the causal connection. It can be forward (in the order stated) or it can be backwards. Sometimes times they can be bidirectional. Substitute "plays a role in" for has something to do with and the direction becomes a bit more clear.
Her depression has something to do with her marital problems. Her depression plays a role in her marital problems.
This is not implying her marital problems are caused by her depression, but rather that her depression is playing a role in her marital problems. But a case can be made for the opposite reading, because it's inherently a bit ambiguous.
Maybe [our obsession with social media] has something to do with the things we thirst for — things like approval, attention, affection, recognition; all the interdependent needs. - NYT
This is clearly the opposite. Our obsession with social media doesn't play a role in our desire for affirmation, but rather the other way around.
The soprano Renée Fleming loves Paris, London and Vienna (not surprisingly, music has something to do with it). - NYT
Music plays a role in Flemimg's love of Paris, etc. - a forward causal direction.
So, unfortunately, the direction of the causal relationship must be determined by context.
Solution 2:
CED has:
be/have something to do with something [informal]
C1 to be related to something or a cause of something
(bolding mine) One of the examples they add
It [eg the unexpected tendency to shatter in the oven] might have something to do with the way it's made.
obviously licenses the or be a result of something sense you ask about. 'Be related to something' is very imprecise.
Solution 3:
Note, most dictionaries and phrase books list “have to do with something”, not your specific phrase “have something to do with something.“ Your version is a lot more restrictive, and I’ll limit my answer purely to your specific phrase.
Although I found plenty of definitions for “have to do with something”, the only other place I found your phrase apart from Cambridge and Macmillan dictionaries is
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs, which defines it as simply:
to be associated with or related to something.
This expression is mostly used to imply causation, but not always, as I'll show later in my answer.
Exactly whether the cause or effect usually comes first, ie, "The [cause] has something to do with [the effect]" is not entirely clear. A Google search comparison of:
has something to do with the problem
and
problem has something to do with
... doesn't really help, as the "problem" in the second example can refer to the cause or effect."
When causality is implied, the direction of causality is not always obvious, but it can be, as you'll see in examples further below.
First let's take cases where I think the direction of causality is unclear. The first one is your example sentence.
Cases where the cause and effect are unclear and ambiguous:
Example 1:
Her depression has something to do with her marital problems.
I can't tell with much certainty if her marital problems created the depression or vice versa. I find this ambiguous.
Example 2:
The higher arrest rates have something to do with greater numbers of police
Did the city employ more police because arrest rates were going up? Or are more people being arrested because there are more police. This isn't clear to me.
However in other cases you can see how the direction of causality is very obvious.
Cases where the cause and effect are clear and unambiguous:
The car not starting has something to do with the fuel pump.
Can you imagine a dysfunctional fuel pump being a cause for why the car won't start?
I say yes.
Can you imagine a car not starting being a cause for a dysfunctional fuel pump?
I have to admit this question doesn't make much sense to me. But I'd be inclined to say no. So I claim that the above example is unambiguous.
Here's another example:
Her anxiety problem has something to do with last year's earthquake.
Can last year's earthquake cause an anxiety problem? I believe so. Can an anxiety problem cause last year's earthquake? I say no. I find this sentence unambiguous.
Notice the difference between examples I find ambiguous and clear. In the ambiguous examples, both terms, the first and the second, can be a cause for the other. That's why at least your first example is ambiguous; marital problems can cause depression, and depression can cause marital problems. In your second example, it's less ambiguous, because generally deforestation is seen to cause global warming, but I don't believe it's as obvious to a general reader that global warming causes deforestation.
Also notice, by swapping the first term and the second term you don't really get a change in meaning:
The car not starting has something to do with the fuel pump.
The fuel pump has something do to with the car not starting.
The higher arrest rates have something to do with greater numbers of police.
Greater numbers of police have something to do with the higher arrest rates.
You can see that the phrase doesn't create a difference when the two terms are swapped, in the same way that "A relates to B" is the same as "B relates to A". Try swapping the first and second terms in your examples and see if they mean anything different. I don't believe they do, because the phrase strictly means "related to" or "associated with".
Finally…
* Cases where the phrase does not imply causality of any sort:*
The letter I got has/had something to do with my insurance.
The film has something to do with giant killer snakes.
Economic protectionism has something to do with levying tariffs on imports.
In the above examples it has the meaning of "relates to" or "associates with".
If you allow for some leeway, I could have given examples of:
That has nothing to do with this.
That evidence has very little to do with this case
The charges have to do with violent crimes
However I’ve strictly adhered to your particular phrase, that is, the first [something] is the word “something” itself: “to have something to do with bowling”.
Conclusions:
1) You can’t know what the phrase means simply by looking at which term comes first and which comes second. In fact if you swap the two terms around I'm pretty sure you get the same meaning.
2) Your phrase very commonly states a cause and effect, but not always.
3) If it implies causation you can know what the cause and effect terms are only if just one of the two terms can be a cause for the other term, and not vice versa also. In these cases it’s not ambiguous. This is just is an observation of mine.
What does your phrase mean? Strictly speaking it means "relating to" or "associated with", however it's mostly used to explain or speculate about a reason for something. The other variants, which I mentioned, are more often just used to mark an association.
Two extra examples:
I've flipped the sentences around so you can see if the order of the cause and effect have a difference to the meaning.
Ambiguous:
His anger issues have something to do with his wife's incessant nagging.
His wife's incessant nagging has something to do with his anger issues.
Unambiguous
Hereditary factors have something do to with developing schizophrenia.
Developing schizophrenia has something to do with hereditary factors.