Berserker isn’t the most natural pairing with any spellcasting class in terms of mechanics; its central Rage feature gets in the way of most spellcasting, after all, but it fits better with warlock than most, even without synergy feats, because a number of their magical features aren’t spells. Notably, their selection of not-spells includes Eldritch Blast and a significant number of invocations. You will still have the problem of needing Strength and Constitution for various berserker features and a mental ability score for warlock ones, though. Pact of the Blade can also provide additional synergy, if desired.
Flavor-wise, it fits reasonably well that a person of fiery temper and poor impulse control might make a dubious bargain for power. It’s also not a huge stretch that someone of strong passions might attract the attention of a supernatural patron with aligned goals, either.
Focusing more on berserker levels gives you a standard melee wrecking machine that has a few bits of magic at their disposal. A stronger focus on warlock levels gives you a typical pact-using spellcaster with a surprising well of fury and some extra durability. Mixing the two creates a supernatural warrior with a wide variety of options at their disposal.
[[Synergy Feats for Multiclassers#Berserker w/ Warlock|Berserker-Warlock chains and ideas]]