Little is known about Marty, aside from the fact that he is good at math and had a case of head lice in second grade that shut down the whole school, presumably due to it spreading.
Diary of a Wimpy Kid
When Marty runs for treasurer, he hands out lollipops to buy himself votes. Greg hangs up posters smearing him, including one that references the head lice incident, though these are quickly taken down by Vice Principal Roy.
Marty doesn't appear afterward, and it is not mentioned whether or not he won the race for treasurer.
Diary of a Wimpy Kid (movie)
To be added
In the online book, Vice Principal Roy makes an announcement that there will be "no negative campaigns" in the student election after taking down Greg's posters, by which point he has lost interest in becoming treasurer.
The day before student elections, Greg becomes worried that he may be elected by default, as Marty's head lice issue had become controversial and he never officially dropped out of the race. To combat this, he makes a few public comments supporting school uniforms in the school hallway. As a result, a student named Musti Patel is elected treasurer.