There is no one firm answer as we all have different tanks and needs.
One biggie when deciding on lids is how your fish act. Almost all fish do some jumping and when spooked they may jump out so no- lid can be a hazard. Different fish, lower water levels or things to block the jumpers are ways to change this. Light diffuser panels can work to keep the fish in and let the heat out.
You will get more trapped heat when you have a lid. This can be good if you need the heat but at times like summer it will depend on how you feel about the higher temp or losing more water from evaporation.
For many, unplugging the heater is a good move during the warmer months. It is one sure way to KNOW that the heater will not malfunction and cook your fish. But then you do have to be alert when the heat is needed again. For me, my house runs at 76 degrees or more during the summer so --no heater needed. Your results may vary!!!