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.
Yoshi's Woolly World
However, Baby Bowser invaded Craft Island, but was fought back.
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/Donkey Kong Country
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.
Meanwhile, Donkey Kong and his son found a life for themselves on an island off the coast of the Mushroom Kingdom. Donkey Kong would later become Cranky Kong and his son would take up the mantle of Donkey Kong. Donkey Kong would build up a great hoard of bananas during this time, before King K. Rool, the leader of the Kremlings, came in and took the bananas for himself. Donkey Kong, alongside his nephew Diddy, went out to secure the Banana Hoard and defeated King K. Rool.
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.
Bowser later invaded Jewelry Land, splitting it into the Light and Dark Realms. Mario and Yoshi, armed with the Super Scope, freed the kingdom from Bowser and the Koopalings.
New Super Mario Bros./Donkey Kong Country 2
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.
Meanwhile, King K. Rool kidnapped Donkey Kong, demanding the Banana Hoard as ransom. Diddy Kong went to save him alongside Dixie Kong, and succeeded in doing so.
Mario and Luigi: Superstar Saga + Bowser's Minions
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.
Meanwhile, the Koopa Troop fought to rescue Bowser from Fawful, succeeding in doing so.
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 ninth 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/Donkey Kong Country 3
Bowser kidnapped Peach on her birthday for the tenth kidnapping, but Mario and Luigi defeated him with the help of two Toads. However, they also conquered the mythical realm of World 9.
Meanwhile, King K. Rool kidnapped both Donkey Kong and Diddy Kong to power his robot named KAOS. Dixie Kong, taking her younger cousin Kiddy Kong with her, successfully rescued the two and defeated King K. Rool.
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 eleventh 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 twelfth 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 thirteenth 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/Donkey Kong 64
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 fourteenth kidnapping, but was ultimately defeated when Yoshi rescued the plumbers.
Meanwhile, King K. Rool attempted to destroy Donkey Kong Island using the Blast-o-Matic weapon, but was defeated by the apes once again.
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.
Super Mario Odyssey
Bowser stages his fifteenth 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.
Wario took over the Peaceful Woods with the help of some monsters, but was defeated by Toad.
New Super Mario Bros. U/Donkey Kong Country Returns
Bowser takes over Peach's castle yet again, kicking Mario, Luigi, and their Toad friends out as part of the sixteenth kidnapping. However, he is defeated yet again.
Meanwhile, Donkey Kong and Diddy Kong faced a new threat: the Tiki Tak Tribe. The group took over Donkey Kong Island, taking the Banana Hoard for themselves. The two Kongs eventually defeated them and took back their bananas.
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 + Rabbids: Kingdom Battle
The day a statue of Princess Peach is revealed for saving Mario, the Rabbids invaded the Mushroom Kingdom. Mario, Luigi, Yoshi, and Peach teamed up with their Rabbid counterparts to save the Mushroom Kingdom once again.
Mario and Luigi: Dream Team
Mario, Luigi, and Peach visit P'illo Island, where Antasma and Bowser work together to kidnap Peach for the seventeenth 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 eighteenth time, using the Royal Stickers, but is ultimately defeated by Mario and Kersti.
Bowser kidnapped Peach for the nineteenth 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 twentieth time.
Paper Mario: Color Splash
Bowser attempted a twenty-first kidnapping using the Black Paint of Prism Island, but was defeated.
Waluigi, Wario's rumored 'brother', decides to set out on an adventure across the Mushroom Kingdom, uncovering the mysterious WAAAATTACKs to utilize in his mission to find self-purpose.
Super Mario Run/Donkey Kong Country: Tropical Freeze
Bowser attempted a more traditional kidnapping for his twenty-second, but was stopped again.
Meanwhile, the Snowmads invaded Donkey Kong Island, freezing it over. Donkey Kong, Diddy Kong, Dixie Kong, and Cranky Kong fought off the Snowmads and saved their island.
Bowser would eventually begin going after the Chronal Stars, forcing the Mario Bros. to venture through the space-time continuum to stop him.
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 is the final era in the timeline.
Bowser signed a peace treaty before the Bringer of Eternal Darkness, who was really Dimentio in disguise, 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.
Tatanga comes back more powerful than ever with "Dark Beast"! They end up failing but Tatanga survives and does a truce with Mario. Tatanga goes back on the planet where he lives in and he'll probably never leave it for a long time.
Wario Land series
Wario continued to search for treasure while maintaining his company.
The following games or forms of media take place in their own timelines, separate from the other games.
Takes place shortly after Bowser's Inside Story in its timeline, revolving around the Trio within the Koopa Troop.