Share Spells just changes who the spell affects, not anything else.
Share Spells (PHB p. 93):
Beginning at 15th level, when you cast a spell targeting yourself, you can also affect your beast companion with the spell if the beast is within 30 feet of you.
Nothing changes about the spell's duration or anything else. If it's a spell that requires concentration, since you (the ranger) cast it, you must make concentration checks to maintain it if you take damage. Your companion isn't you, so it never makes concentration checks for spells you cast.
Also note that use of Spell Sharing is optional; a ranger doesn't have to share the effects of a spell if they don't want to.
If my animal takes damage, dies, or falls unconscious do either of us need to make a concentration check?
No. Only you, the caster, need to make concentration checks, and only when you yourself take damage. Unless the spell says otherwise, it will continue to affect an unconscious animal companion.
If the spell requires concentration only until an effect is triggered and my creature triggers the spell — for example, if my cobra is under the effect of 'Lightning Arrow' and makes a spit attack (a natural weapon) — , does the spell end for it, myself (and therefore both of us), or (because I'm the one who is concentrating) neither of us?
You can figure this out by applying the effects of the Spell Sharing feature to the spell's description, changing the word 'you' to 'you or your companion'.
Looking at Lightning Arrow specifically (alterations mine):
The next time you or your animal companion make a ranged weapon attack during the spell’s duration, the weapon’s ammunition, or the weapon itself if it’s a thrown weapon, transforms into a bolt of lightning.
If your cobra spits, that's not a ranged weapon attack, so it won't trigger Lightning Arrow. Nothing that happens to the cobra, or that it does except making a ranged weapon attack, can end the spell.
Supposing somehow that the cobra could make a ranged weapon attack:
does the spell end for it, myself (and therefore both of us),
The spell ends. It was affecting both of you, and it has ended, so it is no longer affecting the cobra.
or (because I'm the one who is concentrating) neither of us?
The fact that you are concentrating on the spell has no bearing on whether the conditions that can end the spell will arise or not. If your cobra took some action to end the spell, the spell would end.