My best coding/writing playlist is...the entire set of Moody Blues albums, in chronological order. (I've been listening to them for nearly 50 years. Crap I'm old.) The albums have to play in correct order, and the cuts on each album have to play in standard order. It just pretty much becomes a musical cocoon. I've found that if I'm avoiding doing some necessary writing or coding, I can put the playlist on, and I start working almost immediately.
I do much the same thing with the collected Star Wars soundtracks (played in film sequence, i.e., Eps I through VI; and the soundtracks for the prequels are much better than the movies themselves) and the three LOTR soundtracks (again, played in film sequence).
If I'm getting sleepy, I'll put on "Wireless Barenaked Giants", a playlist containing all my Thomas Dolby, Barenaked Ladies, and TMBG songs, played on shuffle.
Ambient electronic would probably put me to sleep.