Green’s Dictionary of Slang

loony n.

also looney, loonie, lunie, luny
[SE lunatic; or loon n.1 ]

[19C+] a fool, an eccentric, a mad person.

In compounds

loony bin (n.)

1. [20C+] a psychiatric institution.

2. [1970s+] in ext./fig. use, a chaotic place, a ‘madhouse’.

loony doctor (n.)

[1920s+] a psychoanalyst, a psychiatrist.

In phrases

do a loony (v.)

[1990s+] (UK juv.) to lose one’s temper, to become hysterical.