Using "I" in this sentence is not correct, though it would be a pretty common mistake. THe easiest way to tell what it should be is put yourself and Bill into separate sentences:
A good time was had by all. A good time was had by Bill. A good time was had by I --?? Nope - A good time was had by me. Therefore, a good time was had by Bill and me. Or, in this case, a good time wa