Searching the plural possessive form students' union and the plural form students union on Google gives us around 6,580,000 hits while its compound form student union yields 8,470,000 hits. The singular possessive form student's union gets 324,000 hits.
In Google Books (which should be a more reliable source but to my consternation it isn't always the case) we have the following data in ascending order:
- a student's union 418 results
- a students' union 7,080 results
- a students union 7,130 results (BUT these also include the apostrophe form too.)
- a student union 43,200 results
The evidence, therefore, suggests that three out of the four forms are more commonly used. The singular possessive form student's union is, however, also grammatically "correct" because you can talk about a single student belonging to a single union, and the possessive apostrophe expresses this concept. But generally speaking, I would give my preference to the last three. There is no hard and fast rule if your school uses the apostrophe in the expression students' union then stick with that. Personally, I would be happy with either student union and students union, without the apostrophe.
Many compound words are nouns formed by two nouns, the first noun is termed an attributive noun or noun adjunct. It is a noun which acts as an adjective and as such, they are not normally pluralized but there are always exceptions, students union is perhaps exemplary. Wikipedia states (emphasis mine)
Noun adjuncts were traditionally mostly singular (e.g. "trouser
press") except when there were lexical restrictions (e.g. "arms
race"), but there is a recent trend towards more use of plural ones,
especially in UK English. Many of these can also be and/or were
originally interpreted and spelled as plural possessives (e.g.
"chemicals' agency", "writers' conference", "Rangers' hockey
game"), but they are now often written without the apostrophe,
although decisions on when to do so require editorial judgment.
There are morphologic restrictions on the classes of adjunct that can
be plural and nonpossessive; irregular plurals are solecistic as
nonpossessive adjuncts (for example, "men clothing" or "women
magazine" are solecistic to fluent speakers).
A wedding planner is a person who helps plan other people's weddings. If there were two or more then one needs to pluralize the last noun e.g. She hired two wedding planners to help her on the big day!
The same rule applies to longer compounds such as special needs teacher or science fiction writer
At my school there are several special needs teachers
There are many science fiction writers I enjoy reading.
A user account ---> two user accounts
A bookshelf ---> two bookshelves
A cookbook (or a cook's book) ---> two cookbooks (or two cooks' books)
People's choice award ---> two people's choice awards
A women's club (NOT a woman club) ---> many women's clubs
A student union---> several student unions
A students union ---> some students unions
@Mr. Shiny and New 安宇 answers a similar question User’s Guide vs Users’ Guide and offers this succinct explanation
User's guide: A guide belonging to one user.
Users' guide: A guide belonging to all the users.