If the mans finger has sperm on the finger and that man is infected with an STD then yes you can get the STD when the man fingers you.
If the finger doesn't have any sperm on it or other bodily fluids then no you cannot get an STD through the fingering.
To get an STD there must be bodily fluids such as sperm or vaginal fluid on the finger when it's inserted into the vagina or butt.
So if the person has an STD such as aids then you should avoid getting fingered by that person or avoid having sex with that person as well.
Sometimes people will have sex with someone and not know that person has an STD and then later they become diagnosed with the STD.
Some STD's can be deadly such as AIDS so be very careful in who you have sex with and if you have kids you should speak with your kids about safe sex.