Why do the battery light and brake light go on? on 2000 Subaru Outback

My brake light and battery light go on intermittently...why? Car starts up, battery's a little crusty, but had both checked out (alternator & battery) and they are okay. Why the lights?

Asked by for the 2000 Subaru Outback
Still could be a sign of the alternator starting to go bad.. or could have some corroded connections..