Once broccoli has turned yellow, it should be thrown out. The same goes for any vegetable that has black moldy spots or smells bad. It's better to be safe than sorry and discard any suspicious or old food that harbors bacteria.