Whenever Burning Sun Cavalry attacks or blocks while you control a Dinosaur, Burning Sun Cavalry gets +1/+1 until end of turn.
If you controlled a Dinosaur when you declared Burning Sun Cavalry as an attacker or blocker, it doesn't matter whether you still control one as its ability resolves. Burning Sun Cavalry will still get +1/+1 until end of turn.