If you are try to connect to stock email app over WiFi it will not work. yahoo does not sync on stock email over WiFi unless you have Froyo. The best thing to do is use an alternate email app. MailDroid and k-9 are the preferred email apps. I came from BB and like MailDroid.
Please always include the email app you're using in threads like this. We're not psychic. From context, I'd also guess it's the infamous WiFi issue. The Yahoo mail app might not have the issue but I don't use it and can't verify for you.