See that little icon in the photo! This tells you that the product is stable for 18 months after opening.
This product is good for 12 months after opening.
Finally, this one is stable for 6 months after opening.
If you don't find this icon directly on the product, it should be on the packaging. If you no longer have the packaging and you can't remember when you bought the item in question, then it's probably time to toss it!
Most products contain some type of ingredient that inhibits fungal and bacteria growth, but this only lasts while the product is sealed. Once the product is exposed the air then small microbes can get I the product and bacteria and fungus can take hold. If the product is in a jar (like the last photo above) and you put your fingers directly in the product, then you introduct even more bacteria (notice the 6 month time limit on that product vs. 12-18 months on the others).
Beside fungus and bacteria, when products are exposed to the air some ingredients can change and therefore alter the activity of the products ingredients. A simple example of this is the evaporation of water that may be in the product. While you may think a product would get weaker when it's "old" (and some do) they can actually become stronger because if water evaporation and cause excess irritation.
So, check for obvious expiration dates or look for the icon I've shown in the photos above. If the expiration date and/or this icon are on the packaging that you will grow away, use a sharpie and write the date directly on your product. If you can't find a date or this icon my general rule is 6 months unless it's an eye product and in that case, 3 months. If you can't remember when you purchased something it's probably best to toss it.