A singles player serves from the right service court when their score is even, including 0. They serve from the left service court when it is odd.
The receiver stands in the diagonally opposite court. So the receiver's court also changes with the score.
If the server wins the rally, they score a point and serve again from the other service court. If the receiver wins the rally, they score a point and become the server.
The server always serves from the court that matches their own score.
Example
Player A leads 4-3 and serves from the right court because 4 is even. If A wins the rally, the score is 5-3 and A serves from the left court.
If B wins that rally instead, the score is 4-4 and B serves from the right court.
Once the serve is returned, either player may hit the shuttle from anywhere on their side of the net.
The service courts matter only for the serve. The whole singles court is used in the rally.
The receiver must stand inside the diagonal service court until the serve is made. Standing on the line is a fault.
After the serve, the receiver may move freely.
The easy check: even score, right court; odd score, left court. Players use this before every serve.
At the start of a new game, the score is 0-0 and the player who won the last game serves from the right.
If the wrong court is used, the mistake is corrected and the score stays the same.
Sources