The short answer
Best avoided — peanuts can carry a mould that's deadly to birds.
Why
Peanuts, especially raw or in-shell, are prone to Aspergillus mould, which produces aflatoxin — a toxin linked to fatal liver disease, and the mould spores can cause aspergillosis, a serious respiratory infection. Because you can't always see the mould, many keepers avoid peanuts entirely.
What to do
If you ever offer nuts, skip peanuts and use fresh, human-grade, shelled, unsalted nuts like a small piece of walnut or almond instead, and discard anything that looks or smells off.