Ordinary twist-on connectors are not rated for wet use (such as exposed outdoors or buried underground).
Another specialized connector version has a permanently attached wire pigtail protruding from the top of the insulated cap.