Toggle built in lighting in script

How could I toggle off the build in lighting while moving around in the scene view, then once the scene view is fixed toggle them back on.

I think you are talking about ambient light. If so:

Setting it to will turn the lights out. If you save the setting before you turn it black, you can then restore it.