The one that is a higher level in my opinion. The difference between those 2 is extremely small. If they are the same level (or very similar) go with the 15 DEF one.
Here's my reasoning: 1 more hp will very rarely make your electivire survive a hit. 1 more def will probably do nothing, but in the very very rare occasion it actually hits a bulkpoint, your Electivire will be noticeably tankier.
Now that I made you read my reasoning, there's another reason (specifically for Electivire) that the perfect DEF is better; Electivire is one of those Pokemon that are effectively "perfect" with 14 HP because of rounding up. So at level 40, your Electivire will be exactly the same as a perfect one.