In the early years of piano construction, keys were commonly made from sugar pine.
Today they are usually made of spruce or basswood. Spruce is typically used in high-quality pianos.
Black keys were traditionally made of ebony, and the white keys were covered with strips of ivory. However, since ivory-yielding species are now endangered and protected by treaty, makers use plastics almost exclusively.
Also, ivory tends to chip more easily than plastic.