I think you can, and also you should wear the glasses while playing tennis, especially if you are nearsighted; because I think you can not see where the ball is without the vision help. I know you are afraid that your eyeglasses will knock off, in fact I understand you because my eyeglasses have knocked off while playing tennis (the situation embarrassed me). If you are the first time to wear the glasses, and you are new to it, you can buy a glasses strap to prevent falling. Of course, if you have been with glasses for some time, I think there is no problem for you, and you can just enjoy your time. Nevertheless, what maybe annoy you is that the sweat, if so, you can wear the contact lenses.
Of course, you can. If you take off the eyeglasses, you will find it hard to see clearly. However, wearing contact lenses is not suitable for doing sports because it may drop off easily. Thus you' better wear glasses to play tennis. However, it is easy to sweat during the sports which may flow into your eyes and make your eyes itching. You'd better wear the headband around your head to stop the sweat from flowing down.
Absolutely, I have played tennis, golf, baseball, football, basketball and even ice hockey while wearing my glasses. They fog up on you, but if you clean them with shaving cream it will keep this from happening.
Yes, you can wear your glasses when playing tennis. But you must make sure that it is not too tight or too loose for you to wear your glasses before you play tennis. As it is of great importance to fix your glasses firmly, rimless glasses is a good choice for you, which is lighter for you to wear, hard to slid and put less pressure on your nose. Also, you can buy slip covers applied to your glasses arm in the glasses shop. It is not expensive at all.