In features, the writer is only on set if invited, or if he's a producer. Trailers for actors and directors are mandated by Guild contracts, but the size of those trailers is negotiable. For dayplayers, it's a room in the honeywagon - the trailer where the bathrooms are, and the AD's office usually is. For big stars, trailers as big as semis are not unusual.
I don't know if the WGA contract mandates a trailer for the writer if that writer is required to be on set for rewrites. I've never heard of a trailer dedicated exclusively for a writer on location. Since the writer would probably be conferencing with the director, he or she could probably camp out in that trailer, since the director will usually be on set.
What AD's usually do when an additional person requires a trailer temporarily is to put that person in the trailer of an actor who's not working that day. (It should be a relatively low status actor so he or she can't raise too much hell about somebody else being in "my" trailer.

)
In TV writers are almost never on set, unless they are also producing or directing. The writers stay in their office area, unless there's good craft service.

The writers' office can be located in the show's home soundstage, another building on the lot, or a building miles away from the soundstage. So when the production is at home, the writers have their offices. They generally don't go on location, unless they just want to hang out, say, for a Friday night shoot at the Marina. So no need for writers trailer there. If they needed one for some reason, they could hole up in the AD office/trailer room.
The idea behind trailers is that they function as mobile dressing rooms with shower and toilet, for people who have to stay for hours, and need someplace to rest, change, shower etc. It's more efficient, and better for tax reasons, to haul the dressing rooms around from location to location rather than fit every place with dressing rooms. That said, the soap operas and live tv shows I've worked on generally use dressing rooms, not trailers. With no location shooting, trailers aren't really needed.
edit
The DGA contract also mandates a hotel for directors working away from home, I think SAG has the same requirement, but I'm not sure. People usually sleep at the hotel, not their trailer. I have heard of writers doing rewrites being put up at hotels.