Dear student it is not longer wire it is the longer part of led which is connected to positive terminal because the longer part of led is positive part. And led will glow only if it forward biased and led will be forward biased when positive part is connected to positive part and negative part is connected to negative. In led longer part is positive and shorter part is negative