I've had stories come to me (via Musefire-like inspiration) in two ways.
1) A really cool situation and/or plot twist comes to mind
2) A really cool character comes to mind
If the character comes first, usually it'll be in dialogue form. Lines of dialogue form in my brain like I'm having a thought about what I want to eat for lunch.
But if I start with a premise, it's harder to develop characters that are real. And dialogue is part of that.
So of course, I did some digging.
10 Creative Techniques for Creating Character-Specific Dialogue come from Emlyn Chand and compiles a list of ways to personalize a character's dialogue, from specific vocabulary choices to catch phrases.
Have you ever read over your work and said something like My Dialogue Sucks? The Creative Penn comes to the rescue by reminding us of the Functions of Dialogue and showing us how to keep the reader from getting bored or distracted.
How to Write Effective Dialogue in Your Novel talks about the ever-important beats: small units that have an action and a reaction. I personally found it was easier to craft good beats while writing longhand. But that's another post.