How can you tell whether conjunctivitis is caused by allergies, virus, or bacteria?

It is difficult. This is something that is best left to the professionals. Although we are taught about signs that are specific to each form of conjunctivitis, they can sometimes overlap or not be present at all. An eye doctor can look at the history of your illness and perform a careful examination to determine the most likely cause.
If you see watery. Eye it is probably viral, if you see watery eye plus itchy it is probably allergic. If you see purulent discharge it is probably bacterial. Take care.
See below. They can all appear very similar. Most of the time the differences are subtle and can only be recognized by a trained ophthalmologist. However, even the best trained ophthalmologist cannot differentiate from 1 visit.