To be on the safe side, if you have a Yahoo ID, you should assume it's no longer secure and change its password. (I just did, and I've never visited Yahoo's contributor-network site until today.) Yahoo is also changing the passwords of affected users.
You should, however, also change other passwords if:
You've used the same password for any other major service -- particularly for sensitive accounts such as banking, investing, or e-mail.
You've ever signed into Yahoo or Associated Content with a non-Yahoo e-mail address.