The lightning can cause a fire regardless of the battery being connected. It can go through the electronics to the battery positive as well. A lightning strike on a solid car can blow electronics, fuse metal, blow out windows and start a fire in the seats or other fabric material or said electronics.
Fire risk aside, you are relatively safer in an enclosed vehicle (No soft top or convertible) during a lightning storm. Cars have been struck while in operation with no significant damage. Others have caught on fire in the cabin, not the engine bay.
Disconnecting the battery is not important.