In fanfiction, it could be related to a magical accident. Maybe a spell went wrong and changed the color of his hair, and then he decided to keep it and even dye it a different color on purpose. It could also be a part of a transformation arc, where changing his appearance, starting with his hair, is a symbol of his growth and change as a character.
Maybe he wants to change his look to disguise himself from his enemies. In fanfiction, there could be all sorts of threats and he might think a new hair color would help him blend in or not be recognized so easily.
He could dye it black to look more mysterious, like a dark wizard in disguise. Or perhaps he'd go for a bright red, which would make him stand out more and show his boldness. Another option could be a platinum blond, giving him a completely different look, maybe to imitate a famous wizard from history.
Maybe he wants to rebel against his family's traditional image. In the wizarding world, the Malfoy family has a certain 'pure - blood' and proper image. Dyeing his hair could be a way for Draco to show his individuality and break free from the constraints his family has put on him.
Maybe it's a magical protection. In the wizarding world, there could be some ancient magic associated with hair length. Long hair might act as a sort of shield or a connection to some deeper magic that Harry unknowingly benefits from.
One reason could be for a disguise. Maybe she's on the run from some bad guys in the fanfiction world and changing her hair color helps her blend in better.
It could be a result of a magical spell gone wrong. Maybe he was experimenting with some powerful magic, and it had an unexpected side effect on his appearance, turning his hair long and white.
Maybe he was in a dangerous duel with a powerful dark wizard. The dark wizard could have cast a spell that was specifically designed to maim or disarm in the most literal sense.
One possible reason could be the overwhelming burden of his destiny. Constantly facing dark forces and the pressure of saving the wizarding world might have worn him down. Another reason could be the loss of his loved ones. For example, if in the fanfiction Hermione or Ron were killed, that could shatter his spirit.
In some fanfiction, Harry might renounce his name to explore a new identity. He has been through so much as Harry Potter, and by giving up his name, he can break free from the predefined roles and destinies associated with it. He could then embark on a journey of self - discovery, free from the constraints of the name that has both defined and haunted him.
One possible reason could be that in the fanfiction, Harry might have discovered some dark secrets about his parents that made him feel betrayed. For example, if he found out they had some hidden and unethical magical experiments in their past.