What you've probably done is created a pop3 account which is set up to remove it from the server on download.
You can't undo this process unless Yahoo! mail has a back up feature. However, there are ways to restore it.
You are probably best to do a few things. First is, change the settings in Outlook to not delete from the server (or at least, keep a few months worth of data) or even review IMAP (details about this further down this post).
In regards to getting them back I would bite the bullet and start emailing all the emails to yourself. This of course is not only laborious but also has other negative effects such as filtering. You also need to do this after you change your email settings in Outlook.
Option 1
Create a new account but use IMAP as this will keep a copy on the server. Then, this should sync them back automatically!
Option 2
Keep it as a Pop3 account, open up the account options in Outlook (File, account settings, account settings). Double click on the email in question, click on advanced tab and then in the new window, the last tab (I think called Advanced (doing this from memory)) will have an option to delete from server or to keep for X amount of days.
Uh oh, you didn't see the setting to
leave Mail on server
– juniorRubyist – 2015-09-23T07:27:45.147I updated your question, if you don't like it, roll it back. Please confirm if you set this up as a Pop3 account?
– Dave – 2013-09-05T10:11:49.120