Is an underhand serve legal?
Yes. You can serve underhand, overhand or with a jump. Any serve is legal if you hit the ball with one hand or arm after releasing it, from the service zone.
Underhand is great for beginners; most competitive players move to overhand float or topspin serves.
To serve underhand, hold the ball low in front of your body, swing your hitting arm like a pendulum and contact the ball with the heel of your hand or a closed fist. Keep the swing smooth rather than hard: accuracy matters more than power, and an underhand serve that always lands in still wins points at beginner level.