It is best to close the lid when using a rotisserie, as this traps the heat in. With the lid open, the heat of the grill escapes, so that only the bottom of the food is cooking at any time. This means it takes significantly longer to cook, and likely won’t cook as evenly. By closing the lid, you keep the heat in, and allow the rotisserie burner to work at its best.
However, you can cook using a rotisserie with the lid open, the results just won’t be as good. The larger cuts of meat can take a long time to cook, especially when the heat is escaping out the top. This results in the meat drying out, and potentially some areas becoming overcooked.
If you have a grill with a built-in rotisserie, check the user's manual for the correct usage.