Hyperglycemia is diagnosed through blood tests that measure glucose levels. Tests such as the fasting blood glucose test, oral glucose tolerance test (OGTT), and HbA1c test are commonly used. These tests help in identifying both short-term and long-term blood sugar levels.