An artist's job is to manipulate the audience.
There are people who might object to this statement, and say that an artist's job is to entertain, or to hold up a mirror to society, but the simple truth is, the only way to do any of that is to connect with the audience. An artist's job is to find a way to make the art resonate with the audience, and the best way to do that is to manipulate the audience towards feeling certain emotions. It's why music is such an integral part of films, and why different shades of paint can change the impressions of a painting. At the end of the day, an artist's main job is to manipulate the audience.
When you're running a game at the table, your audience is the party. This actually puts you in a unique position, because you aren't just performing, but collaborating. Your players are a part of the story, just as much as you are. Their ideas feed the furnace of creativity at the table, and if something works especially well, or if a moment doesn't quite land, you hopefully know your group well enough to adjust.
Your greatest advantage is that you know your players; you know what they like, and what they respond to. And you can use that knowledge against them...
Now, let me clarify - I do not subscribe to the "Player vs. DM" mentality. I see it referenced often online - DMs talk about when players "try to derail" their games. When I posted about the first character death I had in a game I ran, someone on Tumblr actually sent me a message, which read: "Congrats on your first PC kill! I'm aiming for a TPK currently." For those who don't know, a TPK is a Total Party Kill. That's when the entire party of characters is killed in one fell swoop.
Maybe it's because of the gaming culture I came up in, but the idea of a GM actively trying to kill your party members, let alone the entire party, is insane to me. Sure, you should challenge your party - after all, I've had games where many PCs got very close to death, and it raised the stakes tremendously. But trying to kill your characters seems ridiculously unfair. After all, you control how many monsters are in every fight, how often they get magic items, and whether or not they all suffer strokes simultaneously. You are completely capable of killing your party.
But working against them is different from using their weaknesses against them. The former is confrontational; the latter is just good storytelling.
In the first D&D campaign Jay Jones ran for us, we each had a dark secret. As the campaign unfolded, our encounters started to bring up our bad memories of those moments... we didn't fight our old enemies in a literal sense, but there were thematic connections to what our characters were going through. For example, my character had lost a child, and one of the adventures was about rescuing a child who had been separated from his father. And it hit home for my character.
Years later, when he ran "Friday Night Quests," Jay did the same thing - Sweeney, a habitual liar, would encounter a shady carnival manager who can see when people are lying. Now, Jay wouldn't necessarily know how our characters will react to these characters/situations. But he knew we would have a strong reaction.
Another example came when, in my own campaign, the players came to a small dwarven town, ruled over by an evil Baroness. (This was a story inspired by "Snow White and the Seven Dwarves.") The dwarves had been forced to cast out their gods and worship the baroness instead. When our players arrived, they found a pile of broken statuary outside, including a bust of the god our cleric served. And our jolly, happy-go-lucky cleric turned angry, and started banging on the doors of the village with his warhammer. As our players entered, they found that a small resistance was trying to fight off the Baroness, but traitorous dwarves turned in insurrectionists to the duergar (evil dwarves) who patrolled the city. The local dwarf priest was forced to shave his head and his beard, and had the symbol of the Baroness branded into his forehead.
It didn't take long before the party was chomping at the bit to siege the Baroness' tower. Once they got inside, I kept ramping up the hateability. The Baroness had killed other adventurers, left insidious traps, and had performed horrifying experiments on living subjects from the town - at one point our party found a laboratory full of jars, most of which filled with still-beating hearts... and a lab table with the naked body of a headless woman, who somehow was still breathing, despite the fact that her head lay rotting in a bin to the side. By now, the players were ready to destroy the Baroness for the terrible things she had done, all apparently in an attempt to cheat death and live on forever (in one form or another).
They finally found her at the top of the tower, and despite the depictions they had seen of the Baroness throughout the tower, it turned out the Baroness was old and frail (sort of like how the Evil Queen turned into an old hag). She also revealed that she and the party had a common enemy - the Big Bad that the entire campaign was centered around. She was willing to work with them, and lend her support, in order to defeat the villain. And a few of the players considered it, albeit briefly. But other players would hear none of it - for everything the Baroness had done, she simply had to die.
I didn't honestly think the players would work with the Baroness, though it was certainly possible they could have chosen that path. But I wanted them to feel rage towards her. Slowly, I pushed their pressure points: our cleric's religious fervor, our dwarf's sense of honor and his personal pride, our avenger's passion for justice, and the wizard's and the fighter's general senses of human decency. I knew exactly how to push their buttons, and how to get a strong emotional reaction out of them.
This is easier to do the longer a campaign runs. For the first few sessions, you'll still be feeling out the group, and seeing what they respond to. However, that doesn't mean you can't still emotionally manipulate them - the difference is, at this point your process should be closer to a case-control study. Your prompts may not be specific to these players or their characters, but people still have the same emotional reactions to stimuli.
When I accidentally started two D&D groups at once a few years ago (long story), they both began with the same adventure, a one-shot I wrote. The story opens with the party being hired by a Lord to go on a mission and recover an amulet. However, I made this Lord utterly repulsive - modeled in part after "Big Jim" Rennie in Steven King's Under the Dome, and the rest lifted from Jabba the Hutt. He's a wealthy douchebag who fills his halls with weapons and trophies, despite clearly having never been in battle. As he talks to the party, in his thick, Southern drawl, two servants kneel on either side of his throne. One has a bowl of grapes, the other holds up a bowl for the Lord to spit seeds into (the seeds usually end up sprayed over the servant instead).
His daughter, however, is lovely and polite, and she wants the party to find and rescue an old friend of hers, the Captain of the Guard who was sent by the Lord on the last ill-fated mission to find the amulet. Through the course of the adventure, the party learns that the Captain, a female half-orc, is secretly married to the Lord's daughter. (The use of LGBT themes in the adventure is far from accidental - those are there as a litmus test. If presenting a pair of married lesbians is an issue for anyone in my party, then I want to know right away, so I can politely show them the door.)
Think about your favorite moments in movies. A rousing inspirational speech, a tearful confession of love, a pratfall. They may not be especially subtle moments, but they don't have to be - screenwriters learned a long time ago that subtlety isn't nearly as important as establishing an emotional connection. The first moments of a film, when the credits begin to roll, are all carefully crafted to trigger emotional reactions from the audience. And the truth is, the tricks are all very simple... and whether or not you realize it, you've been learning them your whole life. With every film you watch, every book you read, every actual-play D&D podcast you listen to, you're learning about story structure, and how to create situations that your characters can react to in interesting ways.
There's no shame in manipulating your players' emotions, because that's part of your job as a storyteller. But, like anything else, it requires a deft hand. Be mindful of how your players react, and be careful not to go too far. If anyone at the table starts to feel uncomfortable about the situation you're presenting, it can quickly start to take people out of the game. Be mindful of your players' limits, and give them the option of saying when something isn't going over well with them. But once you start to get the hang of it, you can turn a night of goofy dice-rolling over drinks into a tense situation, or provide a moving, emotionally honest moment for your characters.