If you are a union member and your employer recognises your union, it is very likely that there are both formal and informal routes for resolving disputes open to your union workplace representative. As soon as you think you may have a problem, you should raise it with your union rep and seek their advice.
If you are a union member and your employer does not recognise a union, you should still seek advice from your union. You have the right to be accompanied by a union officer in a formal grievance hearing with your employer, and your union may back you in further legal hearings if you have a good case.
If you are not a union member but you work in a unionised workplace, you should join the union. However, some unions may not help you with problems that develop before you join, in the same way that you can't insure your house after it has burned down! There are other sources of information and advice available, but they won't give you the personal service a union will.
If you are not a union member and you work in a non-union workplace, a union may still be prepared to help (especially if it leads to them gaining members and ultimately recognition with your employer). Many problems at work are not individual, but affect many people. This may be ideal territory for a union to take up a common issue.