Isaac Newton held a clear glass prism to the sunbeam that penetrated the shutters of his darkened room and watched in awe as the wall of his office danced with all the colours of the rainbow.

The 28-year-old physicist at Trinity College, Cambridge, was the first to show that white light is a blend of primary colours, a discovery that explains why grass is green and the sky is blue.

His written account of the experiment in 1671 is among the oldest in a collection of scientific milestones described in Letters to the Royal Society, which are made public today to celebrate the 350th anniversary of Britain's academy of science. The documents are released through an online library project called Trailblazing, a name inspired by Newton's famous nod to the work of his predecessors in a note to his rival Robert Hooke: "If I have seen a little further it is by standing on the shoulders of giants."

The letters to the society record the march of science from the earliest blood transfusions, and attempts to capture lightning, to the confirmation of Einstein's theory of relativity, the discovery of DNA and Stephen Hawking's first musings on black holes. The letters reveal a history of failure eclipsed by success, and the maturation of science from a haphazard amateur pursuit to the systematised professionalism of today.

"At that time the only scientists who were in any sense professionals were astronomers and maybe medical doctors, and of the two, the astronomers were the only ones who probably did more good than harm," said Professor Martin Rees, the astronomer royal and president of the society. "If you look at these records, you can't help but notice the immense range of interests they had. They were motivated by curiosity."

There is the letter from the chemist Robert Boyle, asking the physician Richard Lower about the consequences of transfusing blood from one animal into another. Does a dog lose its quirks after transfusion and gain those of the donor? Does blood from a big dog make a small dog grow? Can you safely replace a frog's blood with blood from a calf, and might that change one species into another? The answers were no, no, no and no.

That did not stop Lower moving on to human experiments, paying an "addle-brained" man 20 shillings to receive blood from a lamb. There were hopes it might cure the man's mental condition, but when Samuel Pepys, a president of the society, questioned the physician afterwards, Lower noted that his subject was still "a little cracked in the head".

A letter from Benjamin Franklin from 1752 dispels the myth that lightning is a supernatural force. He recounts an experiment in Philadelphia that he was lucky to survive, involving a thunderstorm and a kite armed with a long metal spike.

Franklin had a keen eye for the appliance of science. On witnessing the Montgolfier brothers' hot air balloon flight, the polymath declared such a device might be strapped to one's errand boy, so he could hop over hedges more swiftly as he ran from house to house. Or, Franklin mused, it could carry wine to great altitude and keep it cool.

In 1769, the English naturalist Daines Barrington wrote to the society after a barrage of tests confirmed that Mozart was indeed a child genius. Barrington visited the eight-year-old at his parents' home, and asked him to play scores he had never seen and to compose on the spot. "His execution was amazing, considering his little fingers could scarcely reach a 5th on the harpsichord," Barrington wrote on hearing one recital.

He vouched for Mozart's age, by confirming birth certificate detail and documenting his behaviour. "Whilst he was playing to me, a favourite cat came in, upon which he immediately left his harpsichord, nor could we bring him back for a considerable time," he wrote. "He would also sometimes run about the room with a stick between his legs by way of horse."

After a safe return to Britain aboard HMS Resolution, Captain James Cook wrote to the Royal Society in 1776 to disclose how he saved his crew from scurvy by filling the hold with "sweet-wort", sauerkraut, lemons and vegetables. One sailor died of an unrelated disease. "Two others were unfortunately drowned, and one killed by a fall; so of the whole number with which I set out from England I lost only four," Cook wrote.

Scientific progress brought inevitable clashes with scripture. The fossilised remains of elephants, tigers, rhinoceroses and hippopotamuses in Kirkdale, Yorkshire, were not washed there by a biblical flood, but showed life on Earth had existed for millions of years, noted the Rev William Buckland in 1822.

To mark the anniversary, the society is calling leading researchers together to thrash out the biggest issues for modern science. Feeding the world and providing clean, green energy will doubtless feature, as will more basic questions on the nature of ageing and consciousness.

"Our world is completely transformed through the application of scientific concepts which could not even be conceived of at the time the society was founded," said Rees. "New questions come into focus as old ones are answered. The important thing about science is it's an unending quest."

The rise of the 'invisible college'

The Royal Society emerged from an "invisible college" of natural philosophers who met in London in the 1640s to discuss the ideas of Francis Bacon. It became a formal society at Gresham College in November 1660 and included prominent names of the time such as architect Christopher Wren, scientist Robert Boyle and John Wilkins, inventor of the metric system.

The society held weekly meetings where experiments were described or performed before the audience. In a royal charter of 1663, the group was officially named as The Royal Society of London for Improving Natural Knowledge.

It is the world's oldest scientific academy in continuous existence, with more than 60 Nobel laureates among its 1,400 fellows and foreign members. Since 1967, it has occupied a row of buildings overlooking St James's Park in London.

Every year, the society names 44 scientists as fellows in recognition of their scientific achievements.

The accolade is the highest a scientist can have, short of a Nobel prize. Existing fellows include neuroscientist Dame Nancy Rothwell, astronomer Jocelyn Bell-Burnell and Cambridge cosmologist Stephen Hawking.