Having beards does not stop a pilot from getting a private or commercial license. But, some airlines may prefer their pilots to be without beards, while others may not mind. So, as a commercial pilot, having beards or not depends on where you work.