Assuming they're a pure screenwriter, and not also a producer or director, do screenwriters get to do anything after handing in the script? Can they be present on the set? Do they have any say in production decisions?
Very little, though it really depends on their relationship with the director and producer.
The screenwriter could be unwanted, seen as a threat to the director's authority. On another set, the director and writer could be good friends, with the director asking for the writers' opinions.
They are generally not guaranteed any say in any production decisions though, as a general rule of thumb.
If you've never seen the Jay Mohr TV series Action, I highly recommend it. Catch it in repeats on IFC, or probably on Netflix. You can even catch some clips on youtube. Definitely worth a viewing. Peter Dragon's (Jay Mohr) treatment of the screenwriter, Adam Rafkin, shows the audience that once the script is in, the screenwriter is essentially nothing. UNTIL he becomes a slave to the 2-cent suggestions of the director, the actors, the producers; essentially anyone who, on a whim, wants a revision gets it. The vision of what's on the page is irrelevant.
Their role is to get their next gig, stay off the set. There are exceptions, of course. No one would ask Aaron Sorkin to leave the stage. But if you just wrote your first 800K horror movie, it's unlikely, but not impossible, that a new writer would be asked for much more than that. That said, directors who know they like reading but not writing, often will ask the writer to visit to help with dialog, especially with dialog, when circumstances require. Powerful stars will also, under some circumstances ask (demand) that a writer be present to help with situations after its clear no one on the company, including the director, can write quickly and effectively. I've worked with directors of some standing who are incredibly ill-suited to oral communication. Once can only guess at the consequences of an actor saying "I can't say this line. It makes no sense. I don't understand it. My character would NEVER say this." Without trained writing talent ready to go, on set, in the conversation, a delay is inevitable. Delays cost money, shots made, shooting light and other perishables. So then the writer is there for protection. Doesn't happen often, but does happen.
Ocasionally scripts need to get altered. Actors may die, get sick, or breach their contracts mid-production. Maybe money runs out, and the last half of the movie needs to be compressed to 10 minutes.
Not a movie example, but Babylon 5 got its last season canceled and later reinstated, which led to much re-writing to condense the canceled season into the previous one, and then expanding the remaining story which hadn't already been filmed back into a full season.