I think (I'm not a native speaker) that
窓が開いている is a neutral statement of the fact; in English "the window is open".
窓が開けてある is saying that someone opened the window in preparation for something. Compare for example to "ビールが冷蔵庫に入れてあります", meaning, in preparation for tonight you have put cans of beer into the fridge to get them cooled.
窓が開けられた is the past passive tense of 開ける and is again neutral; in English "the window has been opened".
窓が開いている
is a neutral statement of the fact; in English "the window is open".窓が開けてある
is saying that someone opened the window in preparation for something. Compare for example toビールが冷蔵庫に入れてあります
, meaning, in preparation for tonight you have put cans of beer into the fridge to get them cooled.窓が開けられた
is the past passive tense of開ける
and is again neutral; in English "the window has been opened".
As for the other two examples you gave:
。。。と書いてあります means "it is written that...", so context matters: unlike above, ~てある can also occur in a neutral sense, i.e. without doing something in preparation.
と書かれた is again the past passive tense of "to write", again in a neutral sense.
...と書いてあります
means "it is written that...", so context matters: unlike above,~てある
can also occur in a neutral sense, i.e. without doing something in preparation.と書かれた
is again the past passive tense of "to write", again in a neutral sense.
Hope this helps and hope native speakers will correct me if I said anything wrong.