I'm sure grave robbers opened them near immediately, but when did the worlds scientific community start exploring them? And specifically, which one was the first?
The answer to your question depends very much on what we think is "scientific". If we consider the pyramids of the Giza plateau, for example – which certainly attracted more attention than any others in Egypt in the past, as they do now – then the earliest work done by archaeologists that was of a standard that means it is still frequently read and referenced today dates only to the last few decades of the nineteenth century – the British archaeologist Flinders Petrie (1853-1942) is a good pick for the first "scientist" in the field, and his first work at Giza was done in the years 1880-83. But there were earlier examples of work that at least aspired to be precise and scientific dating back at least as far as that of Howard Vyse, who was in Egypt in 1837, and arguably the work done by John Greaves, a University of Oxford Arabist whose Pyramidographia, or, A description of the pyramids in Ægypt, based on work done during visits to then Ottoman Egypt in the years 1636-40, comprises the first proper survey of the plateau.
However, the pyramids were certainly open long before that, and a very long line of rulers, travellers and curiosity-seekers certainly entered the Great Pyramid in the centuries before Petrie arrived on the scene. About eight years ago, I got very interested in the question of when, precisely, the Great Pyramid was first opened, and I wrote up my findings in an article for the Smithsonian. It turns out to be an interesting question, since, with a fair bit of effort, I was able to establish that the standard version of events, which ascribes the opening of he pyramid to the Abbasid caliph al-Ma'mun in 820, is definitely wrong. Anyway, since my work does very largely answer your question, I am pasting the text below in the hope it will be of some interest. If you would like to see the illustrated version, which includes diagrams and some wonderful old photos of the pyramid's interior, it is still available here. Enjoy.
Inside the Great Pyramid
There is a story, regrettably apocryphal, about Napoleon and the Great Pyramid. When Bonaparte visited Giza during his Nile expedition of 1798 (it goes), he determined to spend a night alone inside the King’s Chamber, the granite-lined vault that lies precisely in the center of the pyramid. This chamber is generally acknowledged as the spot where Khufu, the most powerful ruler of Egypt’s Old Kingdom (c.2690-2180 BC), was interred for all eternity, and it still contains the remains of Pharaoh’s sarcophagus—a fractured mass of red stone that is said to ring like a bell when struck. Having ventured alone into the pyramid’s forbidding interior and navigated its cramped passages armed with nothing but a guttering candle, Napoleon emerged the next morning white and shaken, and thenceforth refused to answer any questions about what had befallen him that night. Not until 23 years later, as he lay on his death bed, did the emperor at last consent to talk about his experience. Hauling himself painfully upright, he began to speak—only to halt almost immediately.
“Oh, what’s the use,” he murmured, sinking back. “You’d never believe me.”
As I say, the story is not true—Napoleon’s private secretary, De Bourrienne, who was with him in Egypt, insists that he never went inside the tomb. (A separate tradition suggests that the emperor, as he waited for other members of his party to scale the outside of the pyramid, passed the time calculating that the structure contained sufficient stone to erect a wall around all France 12 feet high and one foot thick.) That the tale is told at all, however, is testament to the fascination exerted by this most mysterious of monuments–and a reminder that the pyramid’s interior is at least as compelling as its exterior. Yes, it is impressive to know that Khufu’s monument was built from 2.3 million stone blocks, each weighing on average more than two tons and cut using nothing more than copper tools; to realize that its sides are precisely aligned to the cardinal points of the compass and differ one from another in length by no more than two inches, and to calculate that, at 481 feet, the pyramid remained the tallest man-made structure in the world for practically 4,000 years—until the main spire of Lincoln Cathedral was completed in about 1400 A.D. But these superlatives do not help us to understand its airless interior.
Few would be so bold as to suggest that, even today, we know why Khufu ordered the construction of what is by far the most elaborate system of passages and chambers concealed within any pyramid. His is the only one of the 35 such tombs constructed between 2630 and 1750 B.C. to contain tunnels and vaults well above ground level. (Its immediate predecessors, the Bent Pyramid and the North Pyramid at Dahshur, have vaults built at ground level; all the others are solid structures whose burial chambers lie well underground.) For years, the commonly accepted theory was that the Great Pyramid’s elaborate features were the product of a succession of changes in plan, perhaps to accommodate Pharaoh’s increasingly divine stature as his reign went on, but the American Egyptologist Mark Lehner has marshaled evidence suggesting that the design was fixed before construction began. If so, the pyramid’s internal layout becomes even more mysterious, and that’s before we bear in mind the findings of the Quarterly Review, which reported in 1818, after careful computation, that the structure’s known passages and vaults occupy a mere 1/7,400th of its volume, so that “after leaving the contents of every second chamber solid by way of separation, there might be three thousand seven hundred chambers, each equal in size to the sarcophagus chamber, [hidden] within.”
But if the thinking behind the pyramid’s design remains unknown, there is a second puzzle that should be easier to solve: the question of who first entered the Great Pyramid after it was sealed in about 2566 B.C. and what they found inside it.