i did the same thing at that age, sucking on my 2 fingers... and later on my pinky finger (wish mom had tried harder to stop that, now my pinky finger isnt quite as straight as the other)
believe it or not i actually kinda remember doing it and it was a comfort thing... there's nothing in the mouth so why not put something there cuz you're bored anyway and it's just so empty! lol, thats just what it is.
try keeping a healthy snack on you (if she likes a certain kind of cracker or fruit) and every time you ask her to take her fingers out of her mouth, give her the snack to replace it. but if she puts them back after take something small away from her (if she has a favorite doll she carries everywhere, take it away and say she can have it back when she takes her fingers out)
denis is somewhat right with the scolding thing... you want her to feel like ''not sucking my fingers is good'' not ''im bad for sucking my fingers'' when mom yelled at me for it i also just went and hid and did it anyway. cuz i didnt see a reason not to. give her a reason not to do it :) (what i said about taking something away, does not have to be accompanied with chastising, just say ''i'll give you this back if you keep your fingers out of your mouth'' or something like that)
be patient, it may take a few months, but you'll get there :)