つく and つける: attachment, connection, and switching on
Separate something being attached or included, attaching something to a target, and a light or device switching on. Learn each use with concrete nouns and particles.
付く and 付ける: be attached or attach something
付く describes a stain or part being attached to something. 白いシャツにソースが付いています。 marks the place affected with に and the substance attached with が.
付ける describes attaching a tag or mark to a target. 荷物に名前を書いた札を付けました。 marks the package receiving it with に and the tag being attached with を.
つく and つける for lights and devices
When a light or electricity comes on, use 電気がつく. スイッチを押すと、廊下の電気がつきます。 says that pressing the switch makes the hall light come on.
When someone switches on a light or device, use を in patterns such as 電気をつける and テレビをつける. 暗くなったので、玄関の電気をつけました。 says that the speaker turned on the entrance light because it became dark.
Use the noun to identify the resulting state
このカメラにはストラップが付いています。 says that the camera has a strap attached. 部屋のエアコンがついています。 instead says that the air conditioner in the room is on and running.
Both sentences contain ついています when spoken, but one concerns attachment and the other power status. Lighting and power uses are also often written in kana, so use the accompanying noun and situation rather than relying on spelling alone.
Quick check: Which particles mark the label and the box in “I attached a label to the box”?
Show the answer and why
Say ラベルを箱に付けました。 The label being attached takes を, and the box receiving it takes に.

