The Mario series has never had an official timeline. Here is my theory. You can add your own games to this timeline, or create new timelines based on this one.
The Infant Era
The Infant Era comes first, before the Employment Era, and details events during the youth of the Mario brothers.
Super Mario World 2: Yoshi's Island
Yoshi's New Island
However, the stork brought the Mario brothers to the wrong parents, and ended up being attacked again on the way to the real parents. Yoshi and Baby Mario rescued Baby Luigi once again, and even had to deal with a giant Bowser from the future.
And he did get that revenge by having Kamek take over the island. He was beaten back again, and defeated...for now.
Yoshi's Woolly World
However, Baby Bowser turned Yoshi's Island into yarn, and the Yoshis tried to fight back. They defeated Baby Bowser, and he swore to end his evil.
Yoshi's Island DS
Bowser returned from the future, intent on capturing the Star Children. However, he was defeated at last, and sent back to the future.
Mario and Luigi: Partners in Time (past)
The Shroobs launched their invasion of the Mushroom Kingdom, which would have been successful if it wasn't for time travellers coming from the future. After the events of this game, Mario and Luigi were forced to leave the Mushroom Kingdom.
The Employment Era
The Employment Era occurs after the Infant Era, but before the Invasion Era.
Mario and Luigi, all grown up, begin to look for jobs. They eventually found jobs at a construction site, where they work to demolish buildings. Their boss, Foreman Spike, was not a very good one, as he abused his workers. Mario eventually quit, while Luigi stayed behind.
Punch-Out!!/Dr. Mario/Mario's Picross/Mario Artist/Game & Watch
Mario became a job drifter, drifting from job to job. He first found a job as a doctor, but quit because he was craving a different, more exciting job. He found temporary work as a boxing referee, but when a certain man with green boxing gloves won the championships, Mario was fired until the next season. Not content to wait that long, he found work as an archaeologist, but was fired due to his methods. He eventually found work as an artist, but quit due to not finding a big audience that appreciated his work. He continued to do miscellaneous jobs, such as those featured in the Game & Watch games.
Donkey Kong Circus
Mario eventually found a job as a carpenter. He then began to have a steady life, getting a girlfriend, working hard, and living a good life. One day, when he was visiting the New York Zoo, he found a baby gorilla, unwanted by the zoo. He named him Donkey Kong after King Kong and raised him. Years later, he realized that he could put on his own circus with Donkey Kong as the star, and make a killing. This circus was successful, and Mario earned plenty of cash from it.
Donkey Kong, tired of being abused, escaped from the circus, and kidnapped Pauline. Mario eventually fought his way through Luigi's construction site and recaptured Donkey Kong, but Pauline broke up with him once she learned of his role in animal abuse. Mario was also fired from his carpenting job, but later took up a job as an animal control security guard to watch over Donkey Kong.
Donkey Kong Jr.
Donkey Kong remained in a prison cell, with Mario watching over him with his new job. However, Donkey Kong's son, Donkey Kong Jr., attempted to break him out. He was successful, and the two of them proceeded to wreak havoc on the streets of New York. As for Mario, he was temporarily incarcerated for animal abuse.
Donkey Kong 3
Once the police learned of Mario's relationship with Donkey Kong, they let him out if he could capture the beast. He told both Luigi and his cousin Stanley the Bugman to watch out for Donkey Kong. While Luigi found nothing, Stanley was more successful, as Donkey Kong and his son had attacked his greenhouse. The two of them were captured, and Mario apologized to DK, with the two of them living with each other as roommates in Mario's apartment.
Mario eventually found his true calling: plumbing! Luigi joined him since he was fired from the construction crew, and the two of them proceeded to clean the pipes of New York. Meanwhile, in the Mushroom Kingdom, Bowser learned from Kamek that the Mario brothers were in New York, and sent troops through the pipes to capture them. He was unsuccessful, and Mario and Luigi found the pipe to the Mushroom Kingdom.
The Invasion Era
The Invasion Era occurs after the Employment Era, but before the Era of Peace.
Super Mario Bros.
Mario, Luigi, Donkey Kong, and Donkey Kong Jr. proceeded through the pipe to the Mushroom Kingdom. While DK and his son went to find the rest of the Kongs, Mario and Luigi went to find out who sent the turtles through the pipes. On their journey, they entered castles and defeated foes they only thought existed in their dreams, while rescuing mushroom people who said something about an invasion. Mario and Luigi eventually rescued a princess who was being held hostage by Bowser.
Super Mario Bros.: The Lost Levels
However, just before Peach could say thank you, Bowser emerged from the lava and kidnapped her again. Mario and Luigi continued to proceed through the Mushroom Kingdom, rescuing her again.
Super Mario RPG: Legend of the Seven Stars
Mario and Peach spent some time together, learning of where each of them came from. However, Bowser kidnapped Peach again, but this time, his usual plans were interrupted by invaders from beyond: the Smithy Gang. They attempted to take over the Mushroom Kingdom, but were defeated by Mario, with the help of some new friends. Mario also found the Yoshis, who knew him from the past and told him of his adventures as a baby.
Luigi won a contest that got him a free mansion. However, in this mansion, he had a wacky adventure of his own that resulted in confronting King Boo, who had captured Mario. Luigi eventually sold the mansion.
Super Mario World
Mario, Luigi, and Peach decided to take a vacation to Dinosaur Land, where they could rest after the chaos of Peach's three kidnappings. However, Bowser was waiting for them, and kidnapped Peach once again. This time, with Yoshi at their side, Mario and Luigi successfully defeated Bowser, and went on yet another vacation...
Super Mario Sunshine/Dr. Luigi
Luigi stayed behind in the Mushroom Kingdom to pursue a new job while Mario and Peach travelled to Delfino Isle. However, Bowser's son, Bowser Jr., was working with his father to defeat Mario. However, with the help of F.L.U.D.D., Mario defeated Bowser and his son.
Back in the Mushroom Kingdom, Luigi decided to help cure the sickened Toads who were suffering from sickness by using the medical knowledge that Mario taught him. Although Luigi was successful, he quit to go back to adventuring.
New Super Mario Bros.
Bowser attempted to kidnap Peach for the sixth time, but left most of his plan to Bowser Jr. Mario and Luigi defeated their foe yet again as usual.
Mario and Luigi: Superstar Saga
When Cackletta stole Peach's voice, the Mario brothers went to get it back, going on one of their wackiest adventures yet. On the way, they encountered Professor E. Gadd, who Luigi had met before. He showed off the prototype Poltergust 3001, which would be refined and used in the future.
Super Mario 3D Land
The Super Leaves were spread across the land, while Bowser kidnapped Peach for the seventh time. Mario journeyed through the Mushroom Kingdom to rescue her, and eventually did so.
Super Mario Bros. 3
Bowser launched a massive-scale attack on the Mushroom World, with the Koopalings being used for the first time since the Dinosaur Land invasion. While Mario and Luigi attempted to save the other kingdoms, Bowser kidnapped Peach for the eighth time, but was defeated once again.
For his tenth kidnapping, Bowser turned to supernatural methods. More specifically: the Star Rod. He captured the Star Rod, used it to kidnap Peach, and eliminated Mario. However, Mario prevailed, defeating Bowser with his new friends.
New Super Mario Bros. Wii
Bowser kidnapped Peach on her birthday for the eleventh kidnapping, but Mario and Luigi defeated him with the help of two Toads. However, they also conquered the mythical realm of World 9.
Mario and Luigi: Partners in Time (present)
Professor E. Gadd presented his time machine to the Mushroom Kingdom, but when Peach and two Toad went through, they went missing. Most of this game takes place in the past, at the end of the Infant Era.
Paper Mario: The Thousand-Year Door
Mario ventured to Rogueport to help Peach find the treasure, which was, in fact, the Shadow Queen. With the help of several partners, Mario saved Peach and defeated the Shadow Queen.
Mario and Luigi: Bowser's Inside Story
Bowser attempted a twelfth kidnapping of Peach, but failed miserably. However, with the help of a strange mushroom, he vaccumed up everyone in Peach's castle. However, this led to one of the biggest adventures that the Mario brothers ever experienced, with Fawful attempting to take over the Mushroom Kingdom. Of course, he was defeated.
Super Mario Galaxy
Bowser's thirteenth kidnapping wasn't just a kidnapping, but also an attempt to remake the universe itself. When defeated, the universe recreated itself.
Super Mario Galaxy 2
Bowser attempted a fourteenth kidnapping before the Star Festival could happen again, but failed once more just as the Star Festival was beginning.
Captain Toad: Treasure Tracker
Super Mario 3D World
As the Star Festival went on, Bowser set his sights on the Sprixie Kingdom, but was defeated once more.
Super Mario Bros. 2
Mario, Luigi, Peach, and Toad each had dreams that had to do with Subcon and it's strange inhabitants.
Super Mario 64 DS
With the Power Stars now located in the Mushroom Kingdom, Bowser attempted to kidnap Mario, Luigi, and Wario, a plumber who was jealous of Mario. He took over Peach's castle, essentially staging a fifteenth kidnapping, but was ultimately defeated when Yoshi rescued the plumbers.
When the Blorbs mysteriously returned, Mario took up medicine once more to save the Mushroom Kingdom.
Dr. Mario 64
Mario, once again serving as a temporary doctor, attempts to cure everyone during flu season. However, Wario steals his Megavitamins, but loses them to Mad Sciencstein, who Mario cures, since he had the flu as well.
Bowser stages his sixteenth kidnapping, with yet another defeat.
Super Paper Mario
Peach is kidnapped, but not by Bowser. Instead, Count Bleck has kidnapped her, with the intention of ending all worlds with the power of the Void. However, Mario, Luigi, Peach, and Bowser defeated him and saved the worlds from destruction.
Luigi's Mansion: Dark Moon
Professor E. Gadd is researching ghosts in Evershade Valley until the Dark Moon shatters. Luigi ends up saving Evershade Valley and rescuing Mario after another confrontation with King Boo.
New Super Mario Bros. U
Bowser takes over Peach's castle yet again, kicking Mario, Luigi, and their Toad friends out as part of the seventeenth kidnapping. However, he is defeated yet again.
Super Princess Peach
Bowser sets up a summer villa on Vibe Island before attempting to kidnap the Mario brothers. However, Peach rescues them with the help of her parosol, known as Perry.
Mario and Luigi: Dream Team
Mario, Luigi, and Peach visit P'illo Island, where Antasma and Bowser work together to kidnap Peach for the eighteenth kidnapping. However, Mario and Luigi defeat Bowser even when he is empowered by the Dream Stone.
Paper Mario: Sticker Star
Bowser kidnaps Peach for the nineteenth time, using the Royal Stickers, but is ultimately defeated by Mario and Kersti.
Bowser kidnapped Peach for the twentieth time during his second invasion of Dinosaur Land. However, Mario, Luigi, and the two Toads defeated him once again.
Mario & Luigi: Paper Jam
When Luigi knocked over a magical book detailing some of Mario's greatest adventures, Mario and his brother teamed up with a papery version of himself to stop the two Bowsers from kidnapping Peach a twenty-first time.
Paper Mario: Color Splash
Bowser attempted a twenty-second kidnapping using the Black Paint of Prism Island, but was defeated.
New Super Mario Bros. 2
With tons of coins in the Mushroom Kingdom, Bowser used this wealth to buy more troops for his twenty-third kidnapping. However, Mario and Luigi defeated him, and Bowser gave up on kidnapping Peach.
Era of Peace
The Era of Peace comes after the Invasion Era, but before the Smash Era.
Bowser signed a peace treaty before the Bringer of Eternal Darkness came forth to destroy the Mushroom Kingdom. However, with the Blinding Crystals in hand, Mario and some new friends managed to save the Mushroom Kingdom from destruction once more.
Mario VS. Donkey Kong series/WarioWare series
With the wealth obtained in New Super Mario Bros, 2, Mario established a toy company. However, he ran into an old friend; Donkey Kong. DK stole some of his Mini-Marios, but was defeated. However, he got to keep his own Mini-Mario. Later on, Pauline came to the Mushroom Kingdom and served as vice-president of the company, but DK kidnapped her several times.
Meanwhile, Wario, jealous of Mario's success, started his own company with the coins he obtained: WarioWare Inc. With the help of his friends, he made lots of money, but not as much as Mario did.
Mario Kart series/Mario Party series/Mario sports games
With plenty of money, Mario bought several racing companies and spent the rest of his days playing sports with friends, partying, and racing. Still, he craved adventure.
Super Mario Land/New Super Luigi U
Mario eventually built a castle, but when Daisy was kidnapped by Tangata, he went on his first adventure in years.
Meanwhile, with Mario out of the picture, Bowser attempted a twenty-fourth kidnapping, but failed due to Luigi taking over for his brother.
Super Mario Land 2: Six Golden Coins
When Mario returned to his castle, he found out that Wario had taken over. However, Wario was defeated once more. Mario then returned to his friends, selling his castle.
Wario Land series
Wario continued to search for treasure while maintaining his company.
The Smash Era is the final era in the timeline.
Super Smash Bros.
Master Hand drew many powerful fighters from different dimensions into a fighting tournament within the World of Trophies, which Mario, Luigi, Donkey Kong, and Yoshi attended. However, a clone of Mario known as Metal Mario attempted to sabotage the fighting, and was defeated.
Super Smash Bros. Melee
The first tournament was so successful that Master Hand and his brother Crazy Hand organized a second tournament. This time, Peach and Bowser were invited, alongside a clone of Mario known as Dr. Mario. This time, there was also a virtual reality machine that put each fighter through a distinct adventure. However, Metal Mario and Giga Bowser attempted to sabotage this, but were defeated.
Super Smash Bros. Brawl
Yet another Smash tournament was held, but was sabotaged by the Subspace Army. Diddy Kong and Wario joined this tournament, but had also fought against the Subspace Army. Tabuu was defeated, and the tournament proceeded as normal.
Super Smash Bros. 4
Yet another tournament was held, with Bowser Jr. and Rosalina invited this time. However, the Master Core emerged from Master Hand, and was defeated. Master Hand was revived, and the tournament proceeded as normal.
Another tournament was held, with Funky Kong, Dixie Kong, Lakitu, and Birdo invited. However, the Crazy Core emerged this time, and was defeated.