Yes, it is legal to discriminate based on height. Essentially, all employment discrimination is legal except for that specifically made illegal by a statute, such as race, sex, religion, national origin, disabilitity, or age (over 40) based discrimination. Height is not protected by the law, however; you can be refused a job because you are too tall, too short, etc.