Is there a halachic requirement to wear a hat in today’s society where the derech is not to go before a king with a hat
There are people who say that nowadays we don’t go in front of a king with a hat, therefore we are not required to wear a hat when we daven. This might be true for people that never wear hats, such as people from the east, however for Ashkenazim, who do wear hats when they dress formally, for them this is the proper way to appear in front of someone important. An Ashkenazi that has an appointment with R’ Chaim Kanievsky shlit”a will feel funny coming without a hat and jacket. Therefore although gentiles don’t wear hats, but Jews do, and therefore we should be dressed in an honorable way when standing in front of H-shem.
As a side point, regarding wearing a jacket, even in the U.S. it is considered proper formal dress to wear at a least a jacket when meeting an important dignitary.
Piskei Teshuvos 91-3.