He might gain new powers or abilities. Since the hammer is a powerful magical weapon, lifting it could unlock some latent potential within Peter. Maybe he can now control lightning like Thor, or he has enhanced strength and durability.
Fanfiction often takes creative liberties. It could be that there is a cross - over event that changes the nature of Thor's hammer's worthiness test. Maybe a powerful magical entity in the Harry Potter universe meddles with the hammer's magic. Harry Potter has shown great moral fiber throughout his adventures. His ability to love deeply, his sense of justice, and his unwavering determination against evil could be seen as the 'worthiness' factor by the hammer's magic, allowing him to lift it.
Vision cannot lift Thor's hammer in the comics. The hammer's magic is very selective, and Vision doesn't possess the qualities necessary to overcome its enchantment and lift it.
There could be many people who created such fanfiction. It might be an individual writer who is a big fan of both the Spider - Man and Thor characters and wanted to see what would happen if Peter could lift the hammer. It could also be part of a fanfiction community where different people contribute ideas and sometimes collaborate on stories.