iPhone previously does not allow yahoo contacts and calendar to be synced, but now with the new iphone os iOS 4 you can now sync both of these. For all those of you who own an iPhone 3GS or below, and run iOS4, you can sync the appointments on your Yahoo! Calendar to the calendar on your iPhone in a few easy steps. Once activated, you’ll be able to add or find your appointments whether you’re running around with your iPhone, or if you’re visiting Yahoo! Mail or Yahoo! Calendar on your PC.
If you have a yahoo mail account already
Settings->Mail/Contacts/Calendar->Your Mail Account
If you’re using Yahoo! Mail or Yahoo! Calendar for the first time
Settings->Mail/Contacts/Calendar->Add Account->Yahoo->Enter your account info and click next.
For the new iPhone 4 users, you won’t need to do anything because the new phone software will automatically activate your Yahoo! Calendar once you sync your Yahoo! Mail. You can also sync your contacts to Yahoo! by using the CardDAV protocol. You can read the detailed procedure to setup yahoo calendar.