Draconic Bloodline sorcerers gain Elemental Affinity at level 6. I was wondering if the sorcerer's bloodline was that of a lightning dragon do they gain the EA bonus to thunder damage spells as well as lightning damage spells?
Draconic Ancestry explicitly tells you the damage type "associated with each dragon type [which] is used by features you gain later." (PHB p.102, emphasis mine)
So you've gotten lightning damage type from your ancestry. No mention of thunder. When you gain Elemental Affinity, lightning is the damage type.
Per your comment about sorcerer guides, I believe you're conflating Draconic Sorcerers and Storm Sorcerers. The latter was added in the Sword Coast Adventurer's Guide (SCAG) as an additional sorcerous origin. One of its abilities is called Heart of the Storm, which deals bonus damage when you deal thunder or lightning damage (SCAG p.137).
Draconic's Elemental Affinity bonus damage clearly states that only the damage type associated with your ancestry is boosted (PHB p.102). Lightning and Thunder are further listed as distinct types under the Damage Types section (PHB p.196).
Both Storm's Heart of the Storm and Draconic's Elemental Affinity are gained at level 6, so that probably lent itself to your confusion.
If you look more closely at the arguments in that forum, you'll see they're mostly debating as to whether having both thunder and lightning affected is more useful/common than a single, chosen damage type.