At the end of your second trimester and at any time in your third trimester.
The earlier the better. It gives you ample time to digest the content of the class, practice comfort measures and labor positions, discuss with your healthcare provider about your preferences.
It is a class to attend together with your spouse/partner. Some women love to have their mothers attend the class too.