This question has already been answered. But anyway I'll still post the answer I found from a site by Magamo that I personally find the most helpful. I hope it may provide additional information for those who are still confused despite reading the answers... like me.
"But I don't think this kind of explanation would help understand the difference between そうだ and ようだ. So I'll post a wacky explanation from the view point of what's going on in native speakers' minds.
Your textbooks may explain the difference by showing the difference in reasoning etc., but that can never be accurate. The actual difference between non-hearsay そうだ and そうだ-like ようだ lies in the psychological distance between you and the event, appearance, or other kinds of thing you're mentioning. When you use そうだ, you're psychologically/emotionally tied to the thing/event/situation/whatever and often you're picturing an imaginary world where X in Xそうだ is true and you're standing there in your mind. You might be in an on-going/about-to-happen event, and in that case, the imaginary world can be the very close future world you're picturing in your mind.
In other words, you use そうだ when you're both an observer and a person who is currently involved in some way while ようだ is used when you feel you're an observer and kind of an outsider. When you use そうだ, the situation you're taking about is psychologically in front of you.
For this reason, it's impossible to use そうだ when you're talking about an event that already happened or finished; the current yourself living in the "now" time-frame is always an outsider to the world in the past, and you always feel a certain distance between you and a past event. Of course you can say 雨が降りそうだった when you mean you felt that the "about-to-rain" was psychologically related to you and that it was an on-going event you were experiencing in the past. But it just means "雨が降りそうだ" happened in the past, i.e., you were observing the situation in the past and felt it was related to you.
If you say 雨が降ったそうだ, it only means you heard it had rained, i.e., the other kind of そうだ I mentioned earlier in this post. If you want to say "It seems that it rained," you say 雨が降ったみたいだ/ようだ.
雨が降るみたいだった (it seemed that it was going to rain) is used when you were just an observer and psychologically distant from the rain.
It doesn't matter if it's visual information or your conjecture when it comes to the difference in usage. It's just in certain situations you often feel that things are in front of you in an emotional sense, and some types of reasoning appears more often when you observe a situation as an outsider. For example, when you talk to a cheerful girl, you say:
元気そうだね (more likely used when her cheerful appearance cheers you up)
元気みたいだね (you could sound like you're indifferent)
Another example is:
死にそうだ ("I'm dead tired")
死ぬようだ (You sound like a spiritually enlightened monk who is observing his own death without any worldly emotion)
A real girl would say イキそう when she's coming, but a creepy guy who's fingering a female android would be depressed when he hears her say イクみたい because it clearly shows that the robot has no emotion and is just observing the programmed behavior during sexual intercourse.
I guess it's quite difficult to grasp this psychological thing because it doesn't seem English distinguishes "seem" "appear" "think" etc. this way. Sometimes そうだ and ようだ are pretty much interchangeable too. But I think the general rule is that you use そうだ when you feel it's very "close" to you and in front of you in an emotional sense.
Note that ようだ/みたいだ has a lot more meanings such as "like" as in "I hate a guy like him," and you can't always use そうだ just because it's psychologically in front of you.
I hope a native can clarify this...