Writing in the memorial book of condolence, Mr Cameron described the massacre as "a deeply shameful event in British history", adding "we must never forget what happened here".
He is the first serving Prime Minister to visit the Sikh holy city in the north-western state of Punjab, the scene of the most notorious atrocity in Britain's imperial history in India.
Troops under the command of British Brigadier-General Reginald Dyer shot into a crowd of thousands of protesters, including women, children and elderly people, until their ammunition ran out.
An inquiry found that 379 people were killed in the public gardens of Jallianwala Bagh, though locally the death toll has been put at 1000 or more.
The atrocity helped fuel Mahatma Gandhi's struggle for Indian independence.
Mr Cameron wrote: "This was a deeply shameful event in British history, one that Winston Churchill rightly described at the time as 'monstrous'.
"We must never forget what happened here, and in remembering we must ensure that the United Kingdom stands up for the right of peaceful protest around the world."
Mr Cameron was shown around the site of the massacre, where bullet holes can still be seen, by descendants of some of those who came under fire in 1919.
Later, the memorial's secretary Sukumar Mukherjee said: "He has come here, he has paid his tribute here. It is more than an apology." But Sunil Kapoor, whose great-grandfather died, said: "If you feel shameful then why not make an apology?"
Mr Cameron later said about his visit: "In my view, we are dealing with something here that happened a good 40 years before I was born, and we are dealing with something that... the British Government rightly condemned at the time."