First, enable the Allow apps that use less secure sign-in option on your Yahoo account.
To do that, you have to sign in to your Yahoo account
Navigate to your Yahoo mail address, and click on it.
Click the Account Info highlighted text.
Locate the Account Security tab available at the left-hand side of the screen and click it to configure Yahoo mail in outlook.
Scroll down the screen. Search for the Allow apps that use less secure sign-in
Click the toggle button beside it.
Now, launch the Outlook 2007 application on your system.
Click Tools Account Settings.
Now,the Account Settings dialog box will appear on the screen.
Click the New tab in the Account Settings window.
Choose the Manually configure server settings/ additional server types option in the Auto Account Setup dialog box.
Click the radio button next to the Internet E-mail option, followed by the Next
Now,the Internet E-mail Settings dialog box will appear on the screen.
Below the User Information section, enter your name and Yahoo email address.
Select the POP3 or IMAP account type in the Server Information section.