Identifying insulating states of ultra cold atoms with cavity transmission spectrum