Ideally, the keyboard should be at a height so that your forearm is horizontal ie parallel to the ground. Usually this would mean that the keyboard is a few inches higher than your knee when sat at a chair eg kitchen chair.
The main thing is to feel comfortable when sat at the keyboard. You can get height adjustable piano stools (approx £ 80) and adjustable keyboard stands, which enable you to try different set up positions.