A bracket device includes a bracket, a fastening member and a supporting frame. The bracket includes a side wall and at least one mounting member adjacent to the side wall. The fastening member is movably mounted to the bracket and includes a supporting leg. The supporting frame is movably mounted to the bracket and includes a supporting structure. When the supporting frame is moved relative to the bracket from one position to another position, the supporting structure of the supporting frame is configured to drive the fastening member to switch from a first state to a second state relative to the at least one mounting member through the supporting leg.