When you write a compound sentence with the subordinate clause of time, condition, concession, use a comma if the subordinate clause precedes the main clause. Look at the example:
When I look out of the window I see only primeval nature. Nothing more. I'm happy and healthy.
There is a punctuation mistake in the sentence. Put a comma after the word 'window'.
When I look out of the window, I see only primeval nature. Nothing more. I'm happy and healthy.
But, don't separate the main clause from the subordinate one if it is the first in the sentence.
I see only primeval nature when I look out of the window. Nothing more. I'm happy and healthy.