02 Explorer brake lights stay on go off and come back on

I have an 2002 Explorer, when I depress the brake pedal and release the pedal it comes fully back but the tail lights stay on for 5 to 15 seconds and go off and sometimes they will come back on for awhile and go off. This happens even after we have parked and turn the explorer off. Could this be a bad brake switch?

Probably. They are relatively inexpensive. Change it and see.

Before replacing the switch try adjusting it first. It may just be slightly out to far from the pedal.