Yes, cat food can go bad. All food has an expiration date and that includes pet food. Once opened, wet cat food has a much shorter life than dry food and should be thrown out after a few hours if it is not eaten. If you feed your cat a raw food diet, then you need to be very careful about how long the food is out because of the growth of microbes that cause bacteria. Even in the fridge, raw food has a short shelf life.
Dry cat foods contain a minimal amount of moisture and therefore as long as your kibble of choice is kept in an airtight container it will last much longer. Once in your cat’s bowl and open to moisture in the air as well as other sources of moisture, it can begin to spoil. For this reason, it's recommended that dry food should never be left down for longer than 48 hours.