A British expression meaning crazy, deranged, irrational, or occasionally just stupid. Its origin is a British pronunciation of the name of the town in India called Deolali (about 100 miles from Bombay/Mumbai), where British soldiers waited for a ship home after their tours in Britain's then-colony. It could be difficult to kill time until time for a ship; soldier Frank Roberts wrote in 1936 that "time hung heavily on their hands and in some cases men who had been exemplary soldiers got into serious trouble and were awarded terms of imprisonment before they were sent home. Others contracted venereal disease and had to go to hospital. The well-known saying among soldiers when speaking of a man who does queer things, 'Oh, he's got the Doo-lally tap,' originated, I think, in the peculiar way men behaved owing to the boredom of that camp." 'Tap' was from the Persian and Urdu word for fever, but that part of the expression dropped off when non-soldiers picked it up. A.Word.A.Day says an Australian version of the expression has mutated into "don't do your lolly".

The word has been adopted by many people; a Google search reveals that it is the name of a shop in Brighton, a comedy/magic troupe, a garage band, the surname of a trance DJ, and that on Sunday, February 10, 2002, The Observer printed an article by Arnold Kemp called "I'm still doolally about royalty."

Source:
http://wordsmith.org/awad/archives/0502
http://www.quinion.com/words/qa/qa-doo1.htm
http://www.guardian.co.uk/monarchy/story/0,2763,648051,00.html