Certain medications, especially those that affect the central nervous system or eye health (e.g., drugs for glaucoma or neurological conditions), can sometimes cause phosphenes as a side effect.