A request to be quiet.
On sailing ships signals were given to the crew by sounding the boatswain's (bo'sun's) pipe. One such was 'piping down the hammocks' which was the signal to go below decks and retire for the night. When an officer wanted a sailor to be dismissed below he would have him 'piped down'. This usage is recorded in Royal Navy workbooks from the 18th century; for example, Gillespie's Advice to Commanders & Officers, 1798:
"At four o'clock, P.M. the hammocks should regularly be piped down."
There's no unequivocal link between this naval practice and the 'be quiet' meaning. It could well have derived from the fact that, if there was a disturbance onboard ship, officers could quell it by sending the crew below decks, i.e. by piping them down. This notion is supported by records of ship's crew's being told to 'pipe down' rather than signaled to by the use of an actual pipe; for example, this report from The Gettysburg Star And Banner, April 1850:
'I don't care what happens to me now!' wept Peter, going among the crew, with blood-shot eyes, as he put on his shirt. 'I have been flogged once, and they may do it again, if they will. 'Let them look out for me now'. 'Pipe down!' cried the Captain, and the crew slowly dispersed.