When I first started learning to read music it seemed easy if the same note was repeated, it's easier to hit the same note again with the same finger than it is to search for a new note on the keyboard.
But when trying to play faster pieces, then repeated notes create special problems. It's difficult to hit the same note repeatedly with the same finger and to make it sound fluent, the speed will be limited and there will be a big gap between the notes.
A good habit is to play repeated notes faster by changing fingers. For instance, at 0:19 in this video the note D is repeated 3 times in a row. Trying to play it with the thumb 3 times in a row made it sound jerky, so instead I play it using fingering 1,2,1. At 0:20 you can see the note A is also repeated 3 times, I play it with 5,4,5.
It's one of those cases where sometimes you have to go a bit backwards in order to go forwards, at first this fingering felt awkward, but after a bit of practice it really makes things easier and helps with speeding the piece up.