From the IMDB trivia page, and having just watched it, the piano is a cue to ask a specific question:
When Benoit Blanc is first seen by the audience, he is sitting in the study listening to Lieutenant Elliot question the Thrombey family members, playing the same note on the piano at seemingly random intervals. This was not random at all; after Blanc hits the piano key Lieutenant Elliot always asks the same question; "What time did you arrive at the house?" The piano key was Blanc's signal to Elliot to ask the question.
Director Rian Johnson also addressed it in an interview with The Verge. It seems to link with the idea that the piano is a prompt to ask a specific question, but also that it breaks up a long scene:
What’s the purpose of Daniel Craig’s character hitting the piano keys during the interview scenes?
It’s just a weird goofy thing. I had written in the script that originally Blanc was going to tap the back of Detective Elliot’s chair with his foot every time he wants him to ask a specific question. And when I worked out the geography of it, I saw that Daniel was going to be too far away for his foot to reach, but there was going to be a piano back there. And so just on the day I said, “This is kind of weird, maybe plink the piano.” And Daniel kind of blinked at me and said, “Well, okay.”
It’s also very intentionally odd, it’s meant to have you say, as Don Johnson says, “who the fuck is this guy?” And because it is a long scene, it’s a scene where you could easily get in a lull of question, question, question. So just to throw a couple of drum hits in there that are offbeat, I think there was a benefit to it there.