Fluorescein staining is used to check for ulcers in the dog's eyes that will absorb the stain. It can also be used to assess the functioning of the tear duct, where the stain will appear from the nostrils within 5 to 15 minutes if healthy. This test helps in diagnosing and monitoring eye conditions in dogs.